File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -403,6 +403,11 @@ int wolfSSL_X509_verify_cert(WOLFSSL_X509_STORE_CTX* ctx)
403403 * a trusted CA in the CM */
404404 ret = wolfSSL_X509_verify_cert_ex (ctx );
405405 if (ret != WOLFSSL_SUCCESS ) {
406+ if ((ctx -> store -> param -> flags & X509_V_FLAG_PARTIAL_CHAIN ) &&
407+ (added == 1 )) {
408+ wolfSSL_sk_X509_push (ctx -> chain , ctx -> current_cert );
409+ ret = WOLFSSL_SUCCESS ;
410+ }
406411 goto exit ;
407412 }
408413
Original file line number Diff line number Diff line change @@ -643,7 +643,7 @@ typedef WOLFSSL_X509_NAME_ENTRY X509_NAME_ENTRY;
643643#define X509_V_FLAG_CRL_CHECK WOLFSSL_CRL_CHECK
644644#define X509_V_FLAG_CRL_CHECK_ALL WOLFSSL_CRL_CHECKALL
645645
646- #define X509_V_FLAG_PARTIAL_CHAIN 0
646+ #define X509_V_FLAG_PARTIAL_CHAIN 0x80000
647647#define X509_V_FLAG_TRUSTED_FIRST 0
648648
649649#define X509_V_FLAG_USE_CHECK_TIME WOLFSSL_USE_CHECK_TIME
You can’t perform that action at this time.
0 commit comments