Skip to content

Commit

Permalink
parse certs
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyav committed Mar 20, 2024
1 parent b268d45 commit 42bfc3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions uma/utils/cert_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ func ExtractPubkeyFromPemCertificateChain(certChain string) (*secp256k1.PublicKe
return nil, errors.New("empty certificate chain")
}

return parseToSec256K1PublicKey(&v[0].TBSCertificate.PublicKey)
return parseToSecp256k1PublicKey(&v[0].TBSCertificate.PublicKey)
}

func parseToSec256K1PublicKey(keyData *publicKeyInfo) (*secp256k1.PublicKey, error) {
func parseToSecp256k1PublicKey(keyData *publicKeyInfo) (*secp256k1.PublicKey, error) {
asn1Data := keyData.PublicKey.RightAlign()
return secp256k1.ParsePubKey(asn1Data)
}
Expand Down

0 comments on commit 42bfc3d

Please sign in to comment.