boringssl/crypto/pkcs8
David Benjamin 22ae0b8577 Try both null and empty passwords when decoding PKCS#12.
PKCS#12 encodes passwords as NUL-terminated UCS-2, so the empty password
is encoded as {0, 0}. Some implementations use the empty byte array for
"no password". OpenSSL considers a non-NULL password as {0, 0} and a
NULL password as {}. It then, in high-level PKCS#12 parsing code, tries
both options.

Match this behavior to appease pyOpenSSL's tests.

Change-Id: I07ef91d54454b6f2647f86b7eb9b13509b2876d3
Reviewed-on: https://boringssl-review.googlesource.com/28550
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
Reviewed-by: Adam Langley <agl@google.com>
2018-05-15 23:41:32 +00:00
..
CMakeLists.txt Convert remaining pkcs8 tests to gtest 2017-06-07 17:30:27 +00:00
internal.h Add PKCS12_create. 2018-05-11 21:59:34 +00:00
p5_pbev2.c Run the comment converter on libcrypto. 2017-08-18 21:49:04 +00:00
pkcs8_test.cc Don't crash if asked to treat PBES2 as a PBES1 scheme. 2018-05-11 22:00:04 +00:00
pkcs8_x509.c Try both null and empty passwords when decoding PKCS#12. 2018-05-15 23:41:32 +00:00
pkcs8.c Don't crash if asked to treat PBES2 as a PBES1 scheme. 2018-05-11 22:00:04 +00:00
pkcs12_test.cc Try both null and empty passwords when decoding PKCS#12. 2018-05-15 23:41:32 +00:00