mirror of
https://github.com/golang/go
synced 2024-11-21 21:24:45 -07:00
Init E in tests
This commit is contained in:
parent
c801e2ccc1
commit
9fcd1039d8
@ -222,6 +222,7 @@ func TestSignPKCS1v15WithPublicKeySizeZero(t *testing.T) {
|
|||||||
&PrivateKey{
|
&PrivateKey{
|
||||||
PublicKey: PublicKey{
|
PublicKey: PublicKey{
|
||||||
N: big.NewInt(0),
|
N: big.NewInt(0),
|
||||||
|
E: 65537,
|
||||||
},
|
},
|
||||||
}, crypto.SHA1, digest)
|
}, crypto.SHA1, digest)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
@ -656,7 +656,7 @@ func TestEncryptOAEP(t *testing.T) {
|
|||||||
|
|
||||||
func TestEncryptOAEPWithPublicKeySizeZero(t *testing.T) {
|
func TestEncryptOAEPWithPublicKeySizeZero(t *testing.T) {
|
||||||
sha1 := sha1.New()
|
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 {
|
if err == nil {
|
||||||
t.Error("expected error but got nil")
|
t.Error("expected error but got nil")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user