]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Revert "Do not crash if password is null and GNUTLS_PKCS_PLAIN is not specified."
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 4 Aug 2012 10:57:59 +0000 (12:57 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 4 Aug 2012 10:58:18 +0000 (12:58 +0200)
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

index 825ba8388f6f8f431ecc26de33c6bcc371300d47..3af1045ea681493bfbac16c9cefbaa68a2df049f 100644 (file)
@@ -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);
     }