test: fix flaky key pair generation test#22980
test: fix flaky key pair generation test#22980tniessen wants to merge 1 commit intonodejs:masterfrom
Conversation
|
Suggesting to fast-track, please add 👍 here to approve. |
|
Would it make sense to repeat the encryption/decryption when that happens rather than allow the test to pass? (Not blocking. Just a suggestion. Like, if the decryption fails 100% of the time, we want the test to fail. That sort of thing.) |
|
@Trott Short answer: No. Longer answer: We expect the signing / decryption operation using the generated private key to fail since the private key was encrypted with a custom passphrase.
Both results meet our expectations, but one is much more likely than the other. |
|
Thanks for reviewing! Landed in bad670c. |
There is a very small chance (about 0.4%) that OpenSSL will successfully decrypt a key without the correct passphrase and will then fail while parsing its ASN.1 structure. In those rare cases, the error message will be different. PR-URL: #22980 Fixes: #22978 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
There is a very small chance (about 0.4%) that OpenSSL will successfully decrypt a key without the correct passphrase and will then fail while parsing its ASN.1 structure. In those rare cases, the error message will be different. PR-URL: #22980 Fixes: #22978 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
There is a very small chance (about 0.4%) that OpenSSL will successfully decrypt a key without the correct passphrase and will then fail while parsing its ASN.1 structure. In those rare cases, the error message will be different.
Fixes: #22978
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes