aboutsummaryrefslogtreecommitdiff
path: root/certificate.go
diff options
context:
space:
mode:
authorGibheer <gibheer+git@zero-knowledge.org>2026-06-10 18:32:28 +0200
committerGibheer <gibheer+git@zero-knowledge.org>2026-06-10 18:32:28 +0200
commitcfd9759c4fb32b65dfe075427983207327a03469 (patch)
treea5251837e31177cd3e2ac00722c8f5df1cce43ce /certificate.go
parent0380f7f91c831af18e37414afcdf30935b4b4ee9 (diff)
fix maximum path len for certificatesHEADmaster
When no maximum ca length was given, it was interpreted as a free for all and blocked the certificate generation for normal certificates.
Diffstat (limited to 'certificate.go')
-rw-r--r--certificate.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/certificate.go b/certificate.go
index b90e9fa..9203e57 100644
--- a/certificate.go
+++ b/certificate.go
@@ -127,7 +127,7 @@ func (c *CertificateRequest) ToCertificate(private_key PrivateKey,
if cert_opts.IsCA {
template.BasicConstraintsValid = true
}
- if cert_opts.CALength >= 0 {
+ if cert_opts.CALength > 0 {
template.MaxPathLen = cert_opts.CALength
template.MaxPathLenZero = true
template.BasicConstraintsValid = true