You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b7f2b7e
Browse filesBrowse the repository at this point in the historyBrowse files
test_pkey_rsa.rb: Fix test_private_encoding_encrypted in OpenSSL 4.0 FIPS
[ This is a backport to the 3.3 branch. ]
OpenSSL 4.0.0 added a check for Password-Based Key Derivation Function 2
(PBKDF2) to require the minimal password length 8 in FIPS by the following
commit.
openssl/openssl@71ed0fc
This commit fixes the following test failure in OpenSSL 4.0 FIPS by changing
testing password length from 6 to 8..
```
1) Error: test_private_encoding_encrypted(OpenSSL::TestPKeyRSA): OpenSSL::PKey::PKeyError: i2d_PKCS8PrivateKey_bio: encrypt error
/home/runner/work/openssl/openssl/test/openssl/test_pkey_rsa.rb:465:in `private_to_der'
/home/runner/work/openssl/openssl/test/openssl/test_pkey_rsa.rb:465:in `test_private_encoding_encrypted'
462:
463: def test_private_encoding_encrypted
464: rsa = Fixtures.pkey("rsa2048")
=> 465: encoded = rsa.private_to_der("aes-128-cbc", "abcdef")
466: asn1 = OpenSSL::ASN1.decode(encoded) # PKCS #8 EncryptedPrivateKeyInfo
467: assert_kind_of OpenSSL::ASN1::Sequence, asn1
468: assert_equal 2, asn1.value.size
Error: OpenSSL::PKey::PKeyError: i2d_PKCS8PrivateKey_bio: encrypt error
```
(cherry picked from commit 69f8cd1)
0 commit comments