Skip to content

Commit 8b587b5

Browse files
Merge pull request #7286 from Frauschi/hybrid_signatures
Improvements to dual algorithm certificates
2 parents 5760382 + 8511b2d commit 8b587b5

16 files changed

Lines changed: 2515 additions & 738 deletions

File tree

examples/client/client.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2082,6 +2082,17 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
20822082
WOLFSSL_HEAP_HINT *heap = NULL;
20832083
#endif
20842084

2085+
#ifdef WOLFSSL_DUAL_ALG_CERTS
2086+
/* Set our preference for verfication to be for both the native and
2087+
* alternative chains. Ultimately, its the server's choice. This will be
2088+
* used in the call to wolfSSL_UseCKS(). */
2089+
byte cks_order[3] = {
2090+
WOLFSSL_CKS_SIGSPEC_BOTH,
2091+
WOLFSSL_CKS_SIGSPEC_ALTERNATIVE,
2092+
WOLFSSL_CKS_SIGSPEC_NATIVE,
2093+
};
2094+
#endif /* WOLFSSL_DUAL_ALG_CERTS */
2095+
20852096
((func_args*)args)->return_code = -1; /* error state */
20862097

20872098
#ifndef NO_RSA
@@ -3559,20 +3570,9 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
35593570
}
35603571

35613572
#ifdef WOLFSSL_DUAL_ALG_CERTS
3562-
/* Set our preference for verfication to be for both the native and
3563-
* alternative chains. Ultimately, its the server's choice.
3564-
*/
3565-
{
3566-
byte cks_order[3] = {
3567-
WOLFSSL_CKS_SIGSPEC_BOTH,
3568-
WOLFSSL_CKS_SIGSPEC_ALTERNATIVE,
3569-
WOLFSSL_CKS_SIGSPEC_NATIVE,
3570-
};
3571-
3572-
if (!wolfSSL_UseCKS(ssl, cks_order, sizeof(cks_order))) {
3573-
wolfSSL_CTX_free(ctx); ctx = NULL;
3574-
err_sys("unable to set the CKS order.");
3575-
}
3573+
if (!wolfSSL_UseCKS(ssl, cks_order, sizeof(cks_order))) {
3574+
wolfSSL_CTX_free(ctx); ctx = NULL;
3575+
err_sys("unable to set the CKS order.");
35763576
}
35773577
#endif /* WOLFSSL_DUAL_ALG_CERTS */
35783578

src/internal.c

Lines changed: 408 additions & 74 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)