bugfix nil interface

This commit is contained in:
AJ ONeal 2019-02-09 00:50:56 +00:00
parent 84b07108b6
commit f5cec1b18e
1 changed files with 2 additions and 2 deletions

View File

@ -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: