fix: fixes bug in CVerifyPeerUseEnvVars (#19247)
Previously CVerifyPeerUseEnvVars was not being passed into scanSslCertificates, which meant that we weren't scanning additional certificate locations given via the SSL_CERT_FILE and SSL_CERT_DIR environment variables
This commit is contained in:
parent
78b86b7942
commit
c55930f2e6
2 changed files with 18 additions and 1 deletions
|
|
@ -680,7 +680,8 @@ when defineSsl:
|
|||
# Scan for certs in known locations. For CVerifyPeerUseEnvVars also scan
|
||||
# the SSL_CERT_FILE and SSL_CERT_DIR env vars
|
||||
var found = false
|
||||
for fn in scanSSLCertificates():
|
||||
let useEnvVars = (if verifyMode == CVerifyPeerUseEnvVars: true else: false)
|
||||
for fn in scanSSLCertificates(useEnvVars = useEnvVars):
|
||||
if newCTX.SSL_CTX_load_verify_locations(fn, nil) == VerifySuccess:
|
||||
found = true
|
||||
break
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue