Skip to content

Commit

Permalink
Merge pull request #1132 from asayyah/master
Browse files Browse the repository at this point in the history
Fix race condition in revoke
  • Loading branch information
nickysemenza authored Sep 25, 2020
2 parents 8090bce + 1b44b48 commit 8e907d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions revoke/revoke.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,13 @@ func getIssuer(cert *x509.Certificate) *x509.Certificate {
// check a cert against a specific CRL. Returns the same bool pair
// as revCheck, plus an error if one occurred.
func certIsRevokedCRL(cert *x509.Certificate, url string) (revoked, ok bool, err error) {
crlLock.Lock()
crl, ok := CRLSet[url]
if ok && crl == nil {
ok = false
crlLock.Lock()
delete(CRLSet, url)
crlLock.Unlock()
}
crlLock.Unlock()

var shouldFetchCRL = true
if ok {
Expand Down

0 comments on commit 8e907d3

Please sign in to comment.