Implement golangci-lint suggestions

This commit is contained in:
Jan Dittberner 2022-03-06 16:52:40 +01:00 committed by Jan Dittberner
parent ef69cdaf26
commit 62962b695b
2 changed files with 2 additions and 3 deletions

View file

@ -40,7 +40,6 @@ type CertificateIssuer struct {
responderKey crypto.Signer responderKey crypto.Signer
caCertificate *x509.Certificate caCertificate *x509.Certificate
certDb *OpenSSLCertDB certDb *OpenSSLCertDB
certificateList []*x509.Certificate
} }
// NewIssuer is used to construct a new CertificateIssuer instance // NewIssuer is used to construct a new CertificateIssuer instance
@ -73,7 +72,7 @@ func (i *CertificateIssuer) publicKeyMatches(requestHash []byte, algorithm crypt
} }
issuerHash := h.Sum(nil) issuerHash := h.Sum(nil)
return bytes.Compare(issuerHash, requestHash) == 0, nil return bytes.Equal(issuerHash, requestHash), nil
} }
// buildUnknownResponse builds the OCSP response template for an unknown certificate // buildUnknownResponse builds the OCSP response template for an unknown certificate

View file

@ -67,7 +67,7 @@ func (o *OpenSSLCertDB) update() error {
_ = f.Close() _ = f.Close()
}(f) }(f)
newContent := make(map[string]*ocsp.Response, 0) newContent := make(map[string]*ocsp.Response)
b := bufio.NewReader(f) b := bufio.NewReader(f)
lastLine := false lastLine := false
for { for {