diff --git a/src/crypto/rsa/pkcs1v15_test.go b/src/crypto/rsa/pkcs1v15_test.go index cc5274391ab..8b40ba4b676 100644 --- a/src/crypto/rsa/pkcs1v15_test.go +++ b/src/crypto/rsa/pkcs1v15_test.go @@ -222,6 +222,7 @@ func TestSignPKCS1v15WithPublicKeySizeZero(t *testing.T) { &PrivateKey{ PublicKey: PublicKey{ N: big.NewInt(0), + E: 65537, }, }, crypto.SHA1, digest) if err == nil { diff --git a/src/crypto/rsa/rsa_test.go b/src/crypto/rsa/rsa_test.go index 38765bf4b65..cfb5e0318d0 100644 --- a/src/crypto/rsa/rsa_test.go +++ b/src/crypto/rsa/rsa_test.go @@ -656,7 +656,7 @@ func TestEncryptOAEP(t *testing.T) { func TestEncryptOAEPWithPublicKeySizeZero(t *testing.T) { sha1 := sha1.New() - _, err := EncryptOAEP(sha1, nil, &PublicKey{N: big.NewInt(0)}, nil, nil) + _, err := EncryptOAEP(sha1, nil, &PublicKey{N: big.NewInt(0), E: 65537}, nil, nil) if err == nil { t.Error("expected error but got nil") }