More defensive coding around listing our keys in the yubikey.

Signed-off-by: Ying Li <ying.li@docker.com>
This commit is contained in:
Ying Li 2015-11-13 00:08:53 -08:00
parent 45de2828b5
commit 587906e6c6
2 changed files with 6 additions and 0 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -483,6 +483,12 @@ func yubiListKeys(ctx IPKCS11Ctx, session pkcs11.SessionHandle) (keys map[string
}
}
}
// we found nothing
if cert == nil {
continue
}
var ecdsaPubKey *ecdsa.PublicKey
switch cert.PublicKeyAlgorithm {
case x509.ECDSA: