From d39e69354e988064887080fe5a77045259d68e56 Mon Sep 17 00:00:00 2001 From: David Benoit Date: Fri, 13 Sep 2024 11:43:05 -0400 Subject: [PATCH] Skip overlong message test OpenSSL now returns a random string instead of an error to avoid timing-based attacks. --- src/crypto/rsa/pkcs1v15_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/crypto/rsa/pkcs1v15_test.go b/src/crypto/rsa/pkcs1v15_test.go index 3dd1ec99acf..abf7101c71f 100644 --- a/src/crypto/rsa/pkcs1v15_test.go +++ b/src/crypto/rsa/pkcs1v15_test.go @@ -238,6 +238,10 @@ func TestHashVerifyPKCS1v15(t *testing.T) { } func TestOverlongMessagePKCS1v15(t *testing.T) { + // OpenSSL now returns a random string instead of an error + if boring.Enabled() { + t.Skip("Not relevant in boring mode") + } ciphertext := decodeBase64("fjOVdirUzFoLlukv80dBllMLjXythIf22feqPrNo0YoIjzyzyoMFiLjAc/Y4krkeZ11XFThIrEvw\nkRiZcCq5ng==") _, err := DecryptPKCS1v15(nil, rsaPrivateKey, ciphertext) if err == nil {