From f5cec1b18e0b04f911ee1373ccd0dd105a255a49 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 9 Feb 2019 00:50:56 +0000 Subject: [PATCH] bugfix nil interface --- keypairs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keypairs.go b/keypairs.go index cbaa004..d131c81 100644 --- a/keypairs.go +++ b/keypairs.go @@ -85,7 +85,7 @@ func NewPublicKey(pub crypto.PublicKey, kid ...string) PublicKey { if 0 != len(kid) { eckey.KID = kid[0] } else { - eckey.KID = k.Thumbprint() + eckey.KID = ThumbprintECPublicKey(p) } k = eckey case *rsa.PublicKey: @@ -95,7 +95,7 @@ func NewPublicKey(pub crypto.PublicKey, kid ...string) PublicKey { if 0 != len(kid) { rsakey.KID = kid[0] } else { - rsakey.KID = k.Thumbprint() + rsakey.KID = ThumbprintRSAPublicKey(p) } k = rsakey case *ecdsa.PrivateKey: