Skip to content

Commit f5c1fc8

Browse files
committed
fix CRL generate
1 parent 36ac02b commit f5c1fc8

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

x509cert/crl.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type RevocationEntity struct {
1919
RevocationTime time.Time `yaml:"revocation_time" json:"revocation_time"`
2020
}
2121

22-
func NewCRL(ca Cert, serialNumber int64, updateInterval time.Duration, revs []RevocationEntity) ([]byte, error) {
22+
func NewCRL(ca Cert, serialNumber int64, updateInterval time.Duration, revs []RevocationEntity) (*RawCRL, error) {
2323
list := make([]x509.RevocationListEntry, 0, len(revs))
2424
for _, rev := range revs {
2525
list = append(list, x509.RevocationListEntry{
@@ -43,5 +43,5 @@ func NewCRL(ca Cert, serialNumber int64, updateInterval time.Duration, revs []Re
4343
return nil, fmt.Errorf("failed create revocation list: %w", err)
4444
}
4545

46-
return encodePEM(b, pemTypeRevocationList), nil
46+
return &RawCRL{b}, nil
4747
}

x509cert/ocsp.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ type OCSPStatusResolver interface {
2121
type OCSPStatus int
2222

2323
const (
24-
OCSPStatusUnknown OCSPStatus = ocsp.Unknown
25-
OCSPStatusGood OCSPStatus = ocsp.Good
26-
OCSPStatusRevoked OCSPStatus = ocsp.Revoked
24+
OCSPStatusUnknown OCSPStatus = ocsp.Unknown
25+
OCSPStatusGood OCSPStatus = ocsp.Good
26+
OCSPStatusRevoked OCSPStatus = ocsp.Revoked
27+
OCSPStatusServerFailed OCSPStatus = ocsp.ServerFailed
2728
)
2829

2930
type OCSPServer struct {

0 commit comments

Comments
 (0)