gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 111/219: nss: provide more specific error messages


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 111/219: nss: provide more specific error messages on failed init
Date: Wed, 22 May 2019 19:17:30 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnurl.

commit 9e8f28a8f1fe90c5e88c18f56f82f6c28f804839
Author: Kamil Dudka <address@hidden>
AuthorDate: Fri Apr 26 12:20:21 2019 +0200

    nss: provide more specific error messages on failed init
    
    Closes #3808
---
 lib/vtls/nss.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/lib/vtls/nss.c b/lib/vtls/nss.c
index 08ee1aaaf..8cb783ada 100644
--- a/lib/vtls/nss.c
+++ b/lib/vtls/nss.c
@@ -1305,6 +1305,8 @@ static void nss_unload_module(SECMODModule **pmod)
 static CURLcode nss_init_core(struct Curl_easy *data, const char *cert_dir)
 {
   NSSInitParameters initparams;
+  PRErrorCode err;
+  const char *err_name;
 
   if(nss_context != NULL)
     return CURLE_OK;
@@ -1325,7 +1327,9 @@ static CURLcode nss_init_core(struct Curl_easy *data, 
const char *cert_dir)
     if(nss_context != NULL)
       return CURLE_OK;
 
-    infof(data, "Unable to initialize NSS database\n");
+    err = PR_GetError();
+    err_name = nss_error_to_name(err);
+    infof(data, "Unable to initialize NSS database: %d (%s)\n", err, err_name);
   }
 
   infof(data, "Initializing NSS with certpath: none\n");
@@ -1335,7 +1339,9 @@ static CURLcode nss_init_core(struct Curl_easy *data, 
const char *cert_dir)
   if(nss_context != NULL)
     return CURLE_OK;
 
-  infof(data, "Unable to initialize NSS\n");
+  err = PR_GetError();
+  err_name = nss_error_to_name(err);
+  failf(data, "Unable to initialize NSS: %d (%s)", err, err_name);
   return CURLE_SSL_CACERT_BADFILE;
 }
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]