From 42bfc3ddca0c463b00dff97ef24339aedfcd4037 Mon Sep 17 00:00:00 2001 From: shreyav Date: Wed, 20 Mar 2024 12:25:27 -0700 Subject: [PATCH] parse certs --- uma/utils/cert_utils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uma/utils/cert_utils.go b/uma/utils/cert_utils.go index b8358b8..5de8822 100644 --- a/uma/utils/cert_utils.go +++ b/uma/utils/cert_utils.go @@ -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) }