summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/crypto_init.c
diff options
context:
space:
mode:
authortb <>2025-05-24 02:35:25 +0000
committertb <>2025-05-24 02:35:25 +0000
commit106520eba95dd427fceddb90d7aade730c8b0d41 (patch)
tree20d6fd3b1879ece6d8ea91a1c8ffb7259eb78f37 /src/lib/libcrypto/crypto_init.c
parentc9703fda5ea94cf39d4ec7e101625abdbaefe979 (diff)
downloadopenbsd-106520eba95dd427fceddb90d7aade730c8b0d41.tar.gz
openbsd-106520eba95dd427fceddb90d7aade730c8b0d41.tar.bz2
openbsd-106520eba95dd427fceddb90d7aade730c8b0d41.zip
Switch default to PBES2 for openssl pkcs8 -topk8
We currently use the glorious default of NID_pbeWithMD5AndDES_CBC which we inherited from OpenSSL. This could have been worse - there is also NID_pbeWithMD2AndDES_CBC... The way this diff works is that the undocumented PKCS8_encrypt() API uses the PKCS#5v2 code path when it's passed a NID of -1 and requires a cipher to succeed, otherwise it uses the PKCS#5v1.5 path. So pass in a sensible cipher, namely AES-CBC-256, and let layers of muppetry cascade to doing something resembling the right thing. This still uses the default of hmacWithSHA1 and a somewhat short salt, which will be improved in a subsequent commit. https://github.com/pyca/cryptography/issues/12949 https://github.com/libressl/portable/issues/1168 ok kenjiro joshua jsing
Diffstat (limited to 'src/lib/libcrypto/crypto_init.c')
0 files changed, 0 insertions, 0 deletions