ruby / openssl

Provides SSL, TLS and general purpose cryptography.
Other
240 stars 167 forks source link

pkcs12: add PKCS12#set_mac #788

Open rhenium opened 3 months ago

rhenium commented 3 months ago

Add a binding for PKCS12_set_mac() to set MAC parameters and (re-)calculate MAC for the content.

This allows generating PKCS#12 with consistent MAC parameters with different OpenSSL versions. OpenSSL 3.0 changed the default hash function used for HMAC and the KDF from SHA-1 to SHA-256.

Fixes: https://github.com/ruby/openssl/issues/772