Skip to content

Commit 40e5d53

Browse files
committed
Fix typo
1 parent f20c838 commit 40e5d53

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

x/pki/handler_add_noc_root_cert_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"github.com/zigbee-alliance/distributed-compliance-ledger/x/pki/types"
1212
)
1313

14-
func TestHandler_AddNocX509RootCert_SendorNotVendor(t *testing.T) {
14+
func TestHandler_AddNocX509RootCert_SenderNotVendor(t *testing.T) {
1515
setup := Setup(t)
1616

1717
addNocX509RootCert := types.NewMsgAddNocX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem)

x/pki/keeper/msg_server_propose_add_x_509_root_cert.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func (k msgServer) ProposeAddX509RootCert(goCtx context.Context, msg *types.MsgP
6363
// Issuer and authorityKeyID must be the same as ones of exisiting certificates with the same subject and
6464
// subjectKeyID. Since new certificate is self-signed, we have to ensure that the exisiting certificates are
6565
// self-signed too, consequently are root certificates.
66-
if !existingCertificates.Certs[0].IsRoot {
66+
if !existingCertificate.IsRoot {
6767
return nil, pkitypes.NewErrUnauthorizedCertIssuer(x509Certificate.Subject, x509Certificate.SubjectKeyID)
6868
}
6969

0 commit comments

Comments
 (0)