Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RC2 is deprecated by OpenSSL 3.2.0 #14

Open
nightkr opened this issue Jan 25, 2024 · 1 comment
Open

RC2 is deprecated by OpenSSL 3.2.0 #14

nightkr opened this issue Jan 25, 2024 · 1 comment

Comments

@nightkr
Copy link

nightkr commented Jan 25, 2024

From https://www.openssl.org/news/cl32.txt:

  • The implementation of older EVP ciphers related to CAST, IDEA, SEED, RC2, RC4,
    RC5, DESX and DES have been moved to the legacy provider.

In practice, this means that trying to open an encrypted PKCS#12 bundle generated by p12::EncryptedData::from_safe_bags using OpenSSL will fail:

$ openssl pkcs12 -in truststore.p12 
Enter Import Password:
Error outputting keys and certificates
40976AB7AB730000:error:0308010C:digital envelope routines:inner_evp_generic_fetch:unsupported:../crypto/evp/evp_fetch.c:373:Global default library context, Algorithm (RC2-40-CBC : 0), Properties ()

This can be worked around by using the -legacy flag:

$ openssl pkcs12 -in truststore.p12 -legacy | head -n5
Enter Import Password:
Bag Attributes
    2.16.840.1.113894.746875.1.1: <No Values>
subject=CN = secret-operator self-signed
issuer=CN = secret-operator self-signed
-----BEGIN CERTIFICATE-----
[snip]

However, it would still be good to switch to a more modern algorithm.

@nightkr
Copy link
Author

nightkr commented Jan 25, 2024

Modern OpenSSL defaults to AES-256-CBC and PBKDF2, that seems like a good lead to follow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant