0
0
Fork 0

make the test succeed

This commit is contained in:
Gibheer 2022-08-15 22:36:04 +02:00
parent 9fcfb1009c
commit 8726fcfa3a
1 changed files with 4 additions and 0 deletions

View File

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