]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Allow providing no password for PKCS #12 structure generation. Reported by Daniel...
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Wed, 2 Mar 2011 17:45:30 +0000 (18:45 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Wed, 2 Mar 2011 17:46:00 +0000 (18:46 +0100)
src/certtool.c

index ebd1d8e9a6153a30f8923efdb7bfbfe45526d09a..520b7810a31a103e8c7ba0a6137245aa919f2363 100644 (file)
@@ -2372,6 +2372,13 @@ generate_pkcs12 (common_info_st * cinfo)
     pass = info.pass;
   else
     pass = get_pass ();
+    
+  if (pass == NULL)
+    {
+      fprintf(stderr, "No password given for PKCS #12. Assuming null password...\n");
+      pass = "";
+    }
+    
 
   for (i = 0; i < ncrts; i++)
     {