Files
labca/patches/issuance_crl.patch
2025-03-20 19:57:14 +01:00

26 lines
671 B
Diff

diff --git a/issuance/crl.go b/issuance/crl.go
index f33af1883..b78acf9be 100644
--- a/issuance/crl.go
+++ b/issuance/crl.go
@@ -5,6 +5,7 @@ import (
"crypto/x509"
"fmt"
"math/big"
+ "strings"
"time"
"github.com/zmap/zlint/v3/lint"
@@ -75,7 +76,11 @@ type CRLRequest struct {
// crlURL combines the CRL URL base with a shard, and adds a suffix.
func (i *Issuer) crlURL(shard int) string {
- return fmt.Sprintf("%s%d.crl", i.crlURLBase, shard)
+ if strings.HasSuffix(i.crlURLBase, "/") {
+ return fmt.Sprintf("%s%d.crl", i.crlURLBase, shard)
+ }
+
+ return i.crlURLBase
}
func (i *Issuer) IssueCRL(prof *CRLProfile, req *CRLRequest) ([]byte, error) {