diff options
-rw-r--r-- | certificate_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/certificate_test.go b/certificate_test.go index 8616641..9951d7a 100644 --- a/certificate_test.go +++ b/certificate_test.go @@ -29,6 +29,7 @@ func TestCertificateCreation(t *testing.T) { cert_opts := CertificateOptions{ // KeyUsage: x509.KeyUsageEncipherOnly | x509.KeyUsageKeyEncipherment | x509.KeyUsageCertSign, SerialNumber: big.NewInt(1), + CALength: -1, } cert, err := csr.ToCertificate(pk, cert_opts, nil) @@ -42,6 +43,9 @@ func TestCertificateCreation(t *testing.T) { } func fieldsAreSame(data CertificateData, cert *Certificate) bool { + if cert == nil { + return false + } if data.Subject.CommonName != cert.Subject.CommonName { return false } |