From: John Wolfe Date: Mon, 4 Apr 2022 19:58:41 +0000 (-0700) Subject: VGAuth: Update some error messages with certificate error text. X-Git-Tag: stable-12.1.0~102 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eef3be312ad6f7ed5d96cafa15ffafc89bc43851;p=thirdparty%2Fopen-vm-tools.git VGAuth: Update some error messages with certificate error text. --- diff --git a/open-vm-tools/vgauth/common/certverify.c b/open-vm-tools/vgauth/common/certverify.c index 9b268316d..e54c936b6 100644 --- a/open-vm-tools/vgauth/common/certverify.c +++ b/open-vm-tools/vgauth/common/certverify.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2016, 2018-2019, 2021 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016, 2018-2019, 2021-2022 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -164,10 +164,11 @@ VerifyCallback(int ok, } else { g_strlcpy(nameBuf, "", sizeof nameBuf); } - g_debug("%s: name: %s ok: %d error %d at %d depth lookup:%s\n", + g_debug("%s: name: %s ok: %d error '%s' (%d) at %d depth lookup:%s\n", __FUNCTION__, nameBuf, ok, + X509_verify_cert_error_string(certErr), certErr, X509_STORE_CTX_get_error_depth(ctx), X509_verify_cert_error_string(certErr)); @@ -181,7 +182,9 @@ VerifyCallback(int ok, ret = 1; break; default: - g_warning("%s: error %d treated as failure\n", __FUNCTION__, certErr); + g_warning("%s: error '%s' (%d) treated as failure\n", + __FUNCTION__, X509_verify_cert_error_string(certErr), + certErr); break; } }