Skip to content

Commit b9c12cf

Browse files
committed
Fix the unit test related to CRL signer certificate verification
1 parent cf28090 commit b9c12cf

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

x/pki/types/message_add_pki_revocation_distribution_point_test.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package types
22

33
import (
4+
"crypto/ecdsa"
5+
"crypto/elliptic"
46
x509std "crypto/x509"
57
"fmt"
68
"testing"
@@ -598,9 +600,11 @@ func TestMsgAddPkiRevocationDistributionPoint_verifyCRLCertFormat(t *testing.T)
598600
err: pkitypes.ErrCRLSignerCertificateInvalidFormat,
599601
},
600602
{
601-
name: "PublicKeyAlgorithm is not ECDSA",
603+
name: "PublicKey is not use prime256v1 curve",
602604
init: func(certificate *x509.Certificate) {
603-
certificate.Certificate.PublicKeyAlgorithm = x509std.Ed25519
605+
ecdsaPubKey, _ := certificate.Certificate.PublicKey.(*ecdsa.PublicKey)
606+
ecdsaPubKey.Curve = elliptic.P224()
607+
certificate.Certificate.PublicKey = ecdsaPubKey
604608
},
605609
err: pkitypes.ErrCRLSignerCertificateInvalidFormat,
606610
},

0 commit comments

Comments
 (0)