[libvirt] [PATCH] virsh: improve TLS certificate error messages

Print the name of the CA cert, certificate, and key file that resulted in the failure so that the user has an idea what to troubleshoot. Signed-off-by: Doug Goldstein <cardoe@gentoo.org> --- src/remote/remote_driver.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index e30780c..4c3bdf3 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -1268,8 +1268,8 @@ initialize_gnutls(char *pkipath, int flags) GNUTLS_X509_FMT_PEM); if (err < 0) { remoteError(VIR_ERR_GNUTLS_ERROR, - _("unable to load CA certificate: %s"), - gnutls_strerror (err)); + _("unable to load CA certificate '%s': %s"), + libvirt_cacert, gnutls_strerror (err)); goto error; } @@ -1283,8 +1283,9 @@ initialize_gnutls(char *pkipath, int flags) GNUTLS_X509_FMT_PEM); if (err < 0) { remoteError(VIR_ERR_GNUTLS_ERROR, - _("unable to load private key/certificate: %s"), - gnutls_strerror (err)); + _("unable to load private key '%s' and/or " + "certificate '%s': %s"), libvirt_clientkey, + libvirt_clientcert, gnutls_strerror (err)); goto error; } -- 1.7.5.rc3

On 05/05/2011 04:54 PM, Doug Goldstein wrote:
Print the name of the CA cert, certificate, and key file that resulted in the failure so that the user has an idea what to troubleshoot.
Signed-off-by: Doug Goldstein <cardoe@gentoo.org> --- src/remote/remote_driver.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
Thanks; pushed. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
participants (2)
-
Doug Goldstein
-
Eric Blake