summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2012-08-04 12:57:59 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2012-08-04 12:58:18 +0200
commitf6535bc44280c0b75e13274574645ba2dc36c008 (patch)
treeba5e2d6fd705d433d32339690fb1125247472c11
parentb4222f5db3a8dc197068cce867f458ed333b5dec (diff)
downloadgnutls-f6535bc44280c0b75e13274574645ba2dc36c008.tar.gz
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.
-rw-r--r--lib/x509/privkey_pkcs8.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/x509/privkey_pkcs8.c b/lib/x509/privkey_pkcs8.c
index 825ba8388f..3af1045ea6 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);
}