additional debugging for basic constraints
This commit is contained in:
parent
e68d22337b
commit
c761d98b82
|
@ -110,6 +110,14 @@ func showBasicConstraints(cert *x509.Certificate) {
|
||||||
|
|
||||||
if cert.IsCA {
|
if cert.IsCA {
|
||||||
fmt.Printf(", is a CA certificate")
|
fmt.Printf(", is a CA certificate")
|
||||||
|
if !cert.BasicConstraintsValid {
|
||||||
|
fmt.Printf(" (basic constraint failure)")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
fmt.Printf("is not a CA certificate")
|
||||||
|
if cert.KeyUsage&x509.KeyUsageKeyEncipherment != 0 {
|
||||||
|
fmt.Printf(" (key encipherment usage enabled!)")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cert.MaxPathLen == 0 && cert.MaxPathLenZero) || (cert.MaxPathLen > 0) {
|
if (cert.MaxPathLen == 0 && cert.MaxPathLenZero) || (cert.MaxPathLen > 0) {
|
||||||
|
|
Loading…
Reference in New Issue