termux ssl (#18520)

This commit is contained in:
Paul Roberts 2021-07-20 11:50:43 +01:00 • committed by GitHub
commit 6286b5599c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -647,7 +647,7 @@ when defineSsl:
if verifyMode != CVerifyNone: if verifyMode != CVerifyNone:
# Use the caDir and caFile parameters if set # Use the caDir and caFile parameters if set
if caDir != "" or caFile != "": 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).") raise newException(IOError, "Failed to load SSL/TLS CA certificate(s).")
else: else:

View file

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