termux ssl (#18520)

This commit is contained in:
Paul Roberts
2021-07-20 11:50:43 +01:00
committed by GitHub
parent 5e011e8e42
commit 6286b5599c
2 changed files with 2 additions and 1 deletions

View File

@@ -647,7 +647,7 @@ when defineSsl:
if verifyMode != CVerifyNone:
# Use the caDir and caFile parameters if set
if caDir != "" or caFile != "":
if newCTX.SSL_CTX_load_verify_locations(caFile, caDir) != VerifySuccess:
if newCTX.SSL_CTX_load_verify_locations(if caFile == "": nil else: caFile.cstring, if caDir == "": nil else: caDir.cstring) != VerifySuccess:
raise newException(IOError, "Failed to load SSL/TLS CA certificate(s).")
else:

View File

@@ -34,6 +34,7 @@ elif defined(linux):
# Fedora/RHEL
"/etc/pki/tls/certs",
# Android
"/data/data/com.termux/files/usr/etc/tls/cert.pem",
"/system/etc/security/cacerts",
]
elif defined(bsd):