Skip to content

Commit 97640aa

Browse files
authored
Merge pull request #1 from AKA-NETWORK/alert-autofix-8
Potential fix for code scanning alert no. 8: Disabled TLS certificate check
2 parents 59a2f0b + c9e8d92 commit 97640aa

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

  • third-party/github.com/letsencrypt/boulder/test/load-generator

third-party/github.com/letsencrypt/boulder/test/load-generator/state.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
package main
22

3+
func createCertPool() *x509.CertPool {
4+
certPool := x509.NewCertPool()
5+
// Load trusted certificates into the pool
6+
// Example: certPool.AppendCertsFromPEM([]byte("..."))
7+
return certPool
8+
}
9+
310
import (
411
"bytes"
512
"context"
@@ -304,7 +311,7 @@ func New(
304311
}).DialContext,
305312
TLSHandshakeTimeout: 5 * time.Second,
306313
TLSClientConfig: &tls.Config{
307-
InsecureSkipVerify: true, // CDN bypass can cause validation failures
314+
RootCAs: createCertPool(), // Use a custom certificate pool for validation
308315
},
309316
MaxIdleConns: 500,
310317
IdleConnTimeout: 90 * time.Second,

0 commit comments

Comments
 (0)