forked from wolfSSL/wolfssl
cks_order is used later; don't let it fall out of scope.
This commit is contained in:
@@ -2082,6 +2082,17 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
|||||||
WOLFSSL_HEAP_HINT *heap = NULL;
|
WOLFSSL_HEAP_HINT *heap = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WOLFSSL_DUAL_ALG_CERTS
|
||||||
|
/* Set our preference for verfication to be for both the native and
|
||||||
|
* alternative chains. Ultimately, its the server's choice. This will be
|
||||||
|
* used in the call to wolfSSL_UseCKS(). */
|
||||||
|
byte cks_order[3] = {
|
||||||
|
WOLFSSL_CKS_SIGSPEC_BOTH,
|
||||||
|
WOLFSSL_CKS_SIGSPEC_ALTERNATIVE,
|
||||||
|
WOLFSSL_CKS_SIGSPEC_NATIVE,
|
||||||
|
};
|
||||||
|
#endif /* WOLFSSL_DUAL_ALG_CERTS */
|
||||||
|
|
||||||
((func_args*)args)->return_code = -1; /* error state */
|
((func_args*)args)->return_code = -1; /* error state */
|
||||||
|
|
||||||
#ifndef NO_RSA
|
#ifndef NO_RSA
|
||||||
@@ -3559,21 +3570,10 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WOLFSSL_DUAL_ALG_CERTS
|
#ifdef WOLFSSL_DUAL_ALG_CERTS
|
||||||
/* Set our preference for verfication to be for both the native and
|
|
||||||
* alternative chains. Ultimately, its the server's choice.
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
byte cks_order[3] = {
|
|
||||||
WOLFSSL_CKS_SIGSPEC_BOTH,
|
|
||||||
WOLFSSL_CKS_SIGSPEC_ALTERNATIVE,
|
|
||||||
WOLFSSL_CKS_SIGSPEC_NATIVE,
|
|
||||||
};
|
|
||||||
|
|
||||||
if (!wolfSSL_UseCKS(ssl, cks_order, sizeof(cks_order))) {
|
if (!wolfSSL_UseCKS(ssl, cks_order, sizeof(cks_order))) {
|
||||||
wolfSSL_CTX_free(ctx); ctx = NULL;
|
wolfSSL_CTX_free(ctx); ctx = NULL;
|
||||||
err_sys("unable to set the CKS order.");
|
err_sys("unable to set the CKS order.");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif /* WOLFSSL_DUAL_ALG_CERTS */
|
#endif /* WOLFSSL_DUAL_ALG_CERTS */
|
||||||
|
|
||||||
#ifndef NO_PSK
|
#ifndef NO_PSK
|
||||||
|
Reference in New Issue
Block a user