Skip to content

Commit 07dcd52

Browse files
authored
Merge pull request #5898 from cconlon/androidSystemCa
Add Android CA certs path for wolfSSL_CTX_load_system_CA_certs()
2 parents 502fd84 + f9bd8f7 commit 07dcd52

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/ssl.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8207,11 +8207,15 @@ static int LoadSystemCaCertsMac(WOLFSSL_CTX* ctx, byte* loaded)
82078207

82088208
#else
82098209

8210-
/* Potential system CA certs directories on Linux distros. */
8210+
/* Potential system CA certs directories on Linux/Unix distros. */
82118211
static const char* systemCaDirs[] = {
8212+
#if defined(__ANDROID__) || defined(ANDROID)
8213+
"/system/etc/security/cacerts" /* Android */
8214+
#else
82128215
"/etc/ssl/certs", /* Debian, Ubuntu, Gentoo, others */
82138216
"/etc/pki/ca-trust/source/anchors", /* Fedora, RHEL */
82148217
"/etc/pki/tls/certs" /* Older RHEL */
8218+
#endif
82158219
};
82168220

82178221
const char** wolfSSL_get_system_CA_dirs(word32* num)

0 commit comments

Comments
 (0)