Skip to content

Commit

Permalink
Add missing reader lock to File CA when reading certificate chain (#493)
Browse files Browse the repository at this point in the history
Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
  • Loading branch information
haydentherapper committed Mar 29, 2022
1 parent 61c9601 commit 29a36bb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/ca/fileca/fileca.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ func (fca *fileCA) CreateCertificate(_ context.Context, subject *challenges.Chal
return nil, err
}

fca.RLock()
defer fca.RUnlock()

return ca.CreateCSCFromDER(subject, finalCertBytes, fca.certs)
}

Expand Down

0 comments on commit 29a36bb

Please sign in to comment.