Skip to content

Commit 2b30db3

Browse files
committed
wip
1 parent e440627 commit 2b30db3

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

wolfssl/internal.h

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6366,14 +6366,19 @@ struct SystemCryptoPolicy {
63666366
*/
63676367
#if defined(OPENSSL_EXTRA) && defined(WOLFSSL_HAVE_ERROR_QUEUE)
63686368
#define CLEAR_ASN_NO_PEM_HEADER_ERROR(err) \
6369-
do { \
6370-
(err) = wolfSSL_ERR_peek_last_error(); \
6371-
if (wolfSSL_ERR_GET_LIB(err) == WOLFSSL_ERR_LIB_PEM && \
6372-
wolfSSL_ERR_GET_REASON(err) == -WOLFSSL_PEM_R_NO_START_LINE_E) { \
6369+
do { \
6370+
(err) = wolfSSL_ERR_peek_last_error(); \
6371+
if (wolfSSL_ERR_GET_LIB(err) == WOLFSSL_ERR_LIB_PEM && \
6372+
wolfSSL_ERR_GET_REASON(err) == -WOLFSSL_PEM_R_NO_START_LINE_E) { \
6373+
unsigned long peekErr; \
6374+
do { \
63736375
wc_RemoveErrorNode(-1); \
6374-
} \
6375-
} while (wolfSSL_ERR_GET_LIB(err) == WOLFSSL_ERR_LIB_PEM && \
6376-
wolfSSL_ERR_GET_REASON(err) == -WOLFSSL_PEM_R_NO_START_LINE_E)
6376+
peekErr = wolfSSL_ERR_peek_last_error(); \
6377+
} while (wolfSSL_ERR_GET_LIB(peekErr) == WOLFSSL_ERR_LIB_PEM && \
6378+
wolfSSL_ERR_GET_REASON(peekErr) == \
6379+
-WOLFSSL_PEM_R_NO_START_LINE_E); \
6380+
} \
6381+
} while(0)
63776382
#else
63786383
#define CLEAR_ASN_NO_PEM_HEADER_ERROR(err) (void)(err);
63796384
#endif

0 commit comments

Comments
 (0)