From f6535bc44280c0b75e13274574645ba2dc36c008 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Sat, 4 Aug 2012 12:57:59 +0200 Subject: [PATCH] Revert "Do not crash if password is null and GNUTLS_PKCS_PLAIN is not specified." This allows decrypting PKCS #12 structures that are encrypted with a NULL password (which is different than empty). This reverts commit 7b20e72332e3e5238e8236375a2a82b1387e2e06. --- lib/x509/privkey_pkcs8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/x509/privkey_pkcs8.c b/lib/x509/privkey_pkcs8.c index 825ba8388..3af1045ea 100644 --- a/lib/x509/privkey_pkcs8.c +++ b/lib/x509/privkey_pkcs8.c @@ -1228,7 +1228,7 @@ gnutls_x509_privkey_import_pkcs8 (gnutls_x509_privkey_t key, need_free = 1; } - if (password == NULL || (flags & GNUTLS_PKCS_PLAIN)) + if (flags & GNUTLS_PKCS_PLAIN) { result = decode_private_key_info (&_data, key); } -- 2.11.4.GIT