We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f858c22 commit feccfb8Copy full SHA for feccfb8
src/crypto/x509/cert_pool.go
@@ -161,18 +161,7 @@ func (s *CertPool) contains(cert *Certificate) bool {
161
if s == nil {
162
return false
163
}
164
- candidates := s.byName[string(cert.RawSubject)]
165
- for _, i := range candidates {
166
- c, err := s.cert(i)
167
- if err != nil {
168
- return false
169
- }
170
- if c.Equal(cert) {
171
- return true
172
173
174
-
175
+ return s.haveSum[sha256.Sum224(cert.Raw)]
176
177
178
// AddCert adds a certificate to a pool.
0 commit comments