From: Nikos Mavrogiannopoulos Date: Wed, 2 Mar 2011 17:45:30 +0000 (+0100) Subject: Allow providing no password for PKCS #12 structure generation. Reported by Daniel... X-Git-Tag: gnutls_2_99_0~154 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7af4cea9df35e4088e4153f2c102facc1098a74;p=thirdparty%2Fgnutls.git Allow providing no password for PKCS #12 structure generation. Reported by Daniel Kahn Gillmor. --- diff --git a/src/certtool.c b/src/certtool.c index ebd1d8e9a6..520b7810a3 100644 --- a/src/certtool.c +++ b/src/certtool.c @@ -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++) {