mirror of
https://github.com/outbackdingo/labca.git
synced 2026-01-27 10:19:34 +00:00
26 lines
671 B
Diff
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) {
|