Improve tests

This commit is contained in:
Mariano Cano 2019-02-20 12:18:13 -08:00
parent b974957868
commit adbc496b40
2 changed files with 112 additions and 10 deletions

View file

@ -1,6 +1,7 @@
package api
import (
"crypto/dsa"
"crypto/ecdsa"
"crypto/rsa"
"crypto/tls"
@ -436,7 +437,9 @@ func fmtPublicKey(cert *x509.Certificate) string {
case *ecdsa.PublicKey:
params = pk.Curve.Params().Name
case *rsa.PublicKey:
params = strconv.Itoa(pk.Size())
params = strconv.Itoa(pk.Size() * 8)
case *dsa.PublicKey:
params = strconv.Itoa(pk.Q.BitLen() * 8)
default:
params = "unknown"
}