From daa38a6c315a3e346ca80aff46175425403402f0 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Thu, 8 Dec 2005 14:59:50 +0000 Subject: Generate unencrypted PKCS#8 keys for blank passwords. --- src/certtool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/certtool.c') diff --git a/src/certtool.c b/src/certtool.c index d9613f79ee..381e91a2f1 100644 --- a/src/certtool.c +++ b/src/certtool.c @@ -239,7 +239,8 @@ print_private_key (gnutls_x509_privkey key) flags = GNUTLS_PKCS_USE_PKCS12_RC2_40; else flags = GNUTLS_PKCS_USE_PKCS12_3DES; - if ((pass = get_pass ()) == NULL) + + if ((pass = get_pass ()) == NULL || *pass == '\0') flags = GNUTLS_PKCS_PLAIN; size = sizeof (buffer); -- cgit v1.2.1