]> xenbits.xensource.com Git - libvirt.git/commitdiff
virsh: improve TLS certificate error messages
authorDoug Goldstein <cardoe@gentoo.org>
Thu, 5 May 2011 22:54:52 +0000 (17:54 -0500)
committerEric Blake <eblake@redhat.com>
Thu, 5 May 2011 23:16:58 +0000 (17:16 -0600)
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

index e30780cc938be070eae1e9bd9d1bd07ac38f0bc0..4c3bdf347aa2d1440151601517f7451ab75388f3 100644 (file)
@@ -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;
     }