From 29bea9391bf38c0ea95f59151c7df18efb9f02ab Mon Sep 17 00:00:00 2001 From: Hayden Blauzvern Date: Tue, 29 Mar 2022 20:43:52 +0000 Subject: [PATCH] Add missing reader lock to File CA when reading certificate chain Signed-off-by: Hayden Blauzvern --- pkg/ca/fileca/fileca.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/ca/fileca/fileca.go b/pkg/ca/fileca/fileca.go index 7ef7004b1..7bd5d8932 100644 --- a/pkg/ca/fileca/fileca.go +++ b/pkg/ca/fileca/fileca.go @@ -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) }