Skip to content

Commit 1de0488

Browse files
Merge pull request #6895 from bigbrett/ios-ca-api
Fix WOLFSSL_SYS_CA_CERTS bug on Apple devices
2 parents 9db828a + 2387579 commit 1de0488

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

src/internal.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14223,7 +14223,9 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
1422314223
/* If we are using native Apple CA validation, it is okay
1422414224
* for a CA cert to fail validation here, as we will verify
1422514225
* the entire chain when we hit the peer (leaf) cert */
14226-
if (ssl->ctx->doAppleNativeCertValidationFlag) {
14226+
if ((ssl->ctx->doAppleNativeCertValidationFlag)
14227+
&& (ret == ASN_NO_SIGNER_E)) {
14228+
1422714229
WOLFSSL_MSG("Bypassing errors to allow for Apple native"
1422814230
" CA validation");
1422914231
ret = 0; /* clear errors and continue */

src/ssl.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8576,6 +8576,12 @@ int wolfSSL_CTX_load_system_CA_certs(WOLFSSL_CTX* ctx)
85768576
ctx->doAppleNativeCertValidationFlag = 1;
85778577
ret = WOLFSSL_SUCCESS;
85788578
loaded = 1;
8579+
8580+
#if FIPS_VERSION_GE(2,0) /* Gate back to cert 3389 FIPS modules */
8581+
#warning "Cryptographic operations may occur outside the FIPS module boundary" \
8582+
"Please review FIPS claims for cryptography on this Apple device"
8583+
#endif /* FIPS_VERSION_GE(2,0) */
8584+
85798585
#else
85808586
/* HAVE_SECURITY_SECXXX_H macros are set by autotools or CMake when searching
85818587
* system for the required SDK headers. If building with user_settings.h, you

0 commit comments

Comments
 (0)