@@ -358,6 +358,20 @@ static int IsNoClientCert(const char* line)
358358}
359359#endif
360360
361+ #if (defined(HAVE_ECC ) || defined(HAVE_ED25519 ) || defined(HAVE_ED448 )) && \
362+ !defined(NO_RSA ) && !defined(NO_CERTS ) && !defined(WOLFSSL_NO_CLIENT_AUTH )
363+ static int IsEcdsaCipherSuiteDefRsaCert (const char * line )
364+ {
365+ int found ;
366+
367+ found = (strstr (line , "-ECDSA-" ) != NULL );
368+ found &= (strstr (line , "-c " ) == NULL );
369+ found &= (strstr (line , "-x" ) == NULL );
370+
371+ return found ;
372+ }
373+ #endif
374+
361375static int execute_test_case (int svr_argc , char * * svr_argv ,
362376 int cli_argc , char * * cli_argv ,
363377 int addNoVerify , int addNonBlocking ,
@@ -529,6 +543,49 @@ static int execute_test_case(int svr_argc, char** svr_argv,
529543 svrTestShouldFail = 1 ;
530544 }
531545
546+
547+ commandLine [0 ] = '\0' ;
548+ added = 0 ;
549+ for (i = 0 ; i < cliArgs .argc ; i ++ ) {
550+ added += XSTRLEN (cli_argv [i ]) + 2 ;
551+ if (added >= MAX_COMMAND_SZ ) {
552+ printf ("client command line too long\n" );
553+ break ;
554+ }
555+ XSTRLCAT (commandLine , cli_argv [i ], sizeof commandLine );
556+ XSTRLCAT (commandLine , flagSep , sizeof commandLine );
557+ }
558+ if (!IsValidCA (commandLine )) {
559+ #ifdef DEBUG_SUITE_TESTS
560+ printf ("certificate %s not supported in build\n" , commandLine );
561+ #endif
562+ return NOT_BUILT_IN ;
563+ }
564+ #ifdef WOLFSSL_NO_CLIENT_AUTH
565+ if (reqClientCert && IsNoClientCert (commandLine )) {
566+ #ifdef DEBUG_SUITE_TESTS
567+ printf ("client auth on line %s not supported in build\n" ,
568+ commandLine );
569+ #endif
570+ return NOT_BUILT_IN ;
571+ }
572+ #endif
573+ #ifdef NO_CERTS
574+ if (IsNoClientCert (commandLine )) {
575+ #ifdef DEBUG_SUITE_TESTS
576+ printf ("certificate %s not supported in build\n" , commandLine );
577+ #endif
578+ return NOT_BUILT_IN ;
579+ }
580+ #endif
581+ #if (defined(HAVE_ECC ) || defined(HAVE_ED25519 ) || defined(HAVE_ED448 )) && \
582+ !defined(NO_RSA ) && !defined(NO_CERTS ) && !defined(WOLFSSL_NO_CLIENT_AUTH )
583+ if (IsEcdsaCipherSuiteDefRsaCert (commandLine )) {
584+ return NOT_BUILT_IN ;
585+ }
586+ #endif
587+
588+
532589 InitTcpReady (& ready );
533590
534591#if defined(WOLFSSL_SRTP ) && defined(WOLFSSL_COND )
@@ -596,29 +653,6 @@ static int execute_test_case(int svr_argc, char** svr_argv,
596653 XSTRLCAT (commandLine , cli_argv [i ], sizeof commandLine );
597654 XSTRLCAT (commandLine , flagSep , sizeof commandLine );
598655 }
599- if (!IsValidCA (commandLine )) {
600- #ifdef DEBUG_SUITE_TESTS
601- printf ("certificate %s not supported in build\n" , commandLine );
602- #endif
603- return NOT_BUILT_IN ;
604- }
605- #ifdef WOLFSSL_NO_CLIENT_AUTH
606- if (reqClientCert && IsNoClientCert (commandLine )) {
607- #ifdef DEBUG_SUITE_TESTS
608- printf ("client auth on line %s not supported in build\n" ,
609- commandLine );
610- #endif
611- return NOT_BUILT_IN ;
612- }
613- #endif
614- #ifdef NO_CERTS
615- if (IsNoClientCert (commandLine )) {
616- #ifdef DEBUG_SUITE_TESTS
617- printf ("certificate %s not supported in build\n" , commandLine );
618- #endif
619- return NOT_BUILT_IN ;
620- }
621- #endif
622656 printf ("trying client command line[%d]: %s\n" , tests , commandLine );
623657 tests ++ ;
624658
0 commit comments