Skip to content

Commit 9b6b416

Browse files
committed
move CFErrorRef instantiation
cleanup
1 parent 79b6e62 commit 9b6b416

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

src/internal.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16336,7 +16336,6 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
1633616336
}
1633716337
#endif
1633816338

16339-
WOLFSSL_MSG_EX("checking for ability to match names verifyNone = %d and domainname is null? %s", ssl->options.verifyNone, ((ssl->buffers.domainName.buffer == NULL) ? "yes" : "no"));
1634016339
if (!ssl->options.verifyNone && ssl->buffers.domainName.buffer) {
1634116340
#ifndef WOLFSSL_ALLOW_NO_CN_IN_SAN
1634216341
/* Per RFC 5280 section 4.2.1.6, "Whenever such identities
@@ -42874,7 +42873,7 @@ static int MaxValidityPeriodErrorOnly(CFErrorRef error)
4287442873
CFErrorCopyUserInfo((CFErrorRef)underlying);
4287542874
if (underlyingDict) {
4287642875
char buffer[512];
42877-
CFStringRef values =
42876+
CFStringRef values =
4287842877
CFDictionaryGetValue(underlyingDict,
4287942878
kCFErrorLocalizedDescriptionKey);
4288042879
if(CFStringGetCString(values, buffer, sizeof(buffer),
@@ -42926,6 +42925,7 @@ static int DoAppleNativeCertValidation(WOLFSSL* ssl,
4292642925
SecTrustRef trust = NULL;
4292742926
SecPolicyRef policy = NULL;
4292842927
CFStringRef hostname = NULL;
42928+
CFErrorRef error = NULL;
4292942929

4293042930
WOLFSSL_ENTER("DoAppleNativeCertValidation");
4293142931

@@ -42991,7 +42991,6 @@ static int DoAppleNativeCertValidation(WOLFSSL* ssl,
4299142991
/* Evaluate the certificate's authenticity */
4299242992
WOLFSSL_MSG("Performing Apple native cert validation via "
4299342993
"SecTrustEvaluateWithError");
42994-
CFErrorRef error = NULL;
4299542994
ret = SecTrustEvaluateWithError(trust, &error);
4299642995
if (ret != 1) {
4299742996
if (error) {
@@ -43016,7 +43015,6 @@ static int DoAppleNativeCertValidation(WOLFSSL* ssl,
4301643015
WOLFSSL_MSG("Skipping certificate validity period error");
4301743016
ret = 1;
4301843017
}
43019-
/* TODO: ensure other errors aren't masked by this error */
4302043018
}
4302143019
#endif
4302243020
(void)code;

tests/api.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8070,7 +8070,6 @@ static int test_wolfSSL_client_server_nofail_memio_ex(test_ssl_cbf* client_cb,
80708070
test_ctx.s_cb.return_code = EXPECT_FAILURE_CODEPOINT_ID;
80718071

80728072
ExpectIntEQ(test_ssl_memio_setup(&test_ctx), TEST_SUCCESS);
8073-
WOLFSSL_MSG("DONE WITH THE FEKIN SETUP");
80748073
ExpectIntEQ(test_ssl_memio_do_handshake(&test_ctx, 10, NULL), TEST_SUCCESS);
80758074

80768075
if (client_on_handshake != NULL) {
@@ -8115,7 +8114,6 @@ static int test_wolfSSL_client_server_nofail_memio_ex(test_ssl_cbf* client_cb,
81158114
int test_wolfSSL_client_server_nofail_memio(test_ssl_cbf* client_cb,
81168115
test_ssl_cbf* server_cb, cbType client_on_handshake)
81178116
{
8118-
WOLFSSL_MSG("EHE ANOTHER EXTENSION >:(");
81198117
return (test_wolfSSL_client_server_nofail_memio_ex(client_cb, server_cb,
81208118
client_on_handshake, NULL));
81218119
}

0 commit comments

Comments
 (0)