forked from wolfSSL/wolfssl
add aesgcm openssl, and fix requires to use our local enum for aesgcm
This commit is contained in:
@ -5921,44 +5921,44 @@ int SetCipherList(Suites* s, const char* list)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 :
|
case TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 :
|
||||||
if (requirement == ecc_dsa_sa_algo)
|
if (requirement == REQUIRES_ECC_DSA)
|
||||||
return 1;
|
return 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 :
|
case TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 :
|
||||||
if (requirement == ecc_dsa_sa_algo)
|
if (requirement == REQUIRES_ECC_DSA)
|
||||||
return 1;
|
return 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 :
|
case TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 :
|
||||||
if (requirement == ecc_static_diffie_hellman_kea)
|
if (requirement == REQUIRES_ECC_STATIC)
|
||||||
return 1;
|
return 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 :
|
case TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 :
|
||||||
if (requirement == ecc_static_diffie_hellman_kea)
|
if (requirement == REQUIRES_ECC_STATIC)
|
||||||
return 1;
|
return 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 :
|
case TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 :
|
||||||
if (requirement == rsa_kea)
|
if (requirement == REQUIRES_RSA)
|
||||||
return 1;
|
return 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 :
|
case TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 :
|
||||||
if (requirement == rsa_kea)
|
if (requirement == REQUIRES_RSA)
|
||||||
return 1;
|
return 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 :
|
case TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 :
|
||||||
if (requirement == ecc_static_diffie_hellman_kea)
|
if (requirement == REQUIRES_ECC_STATIC)
|
||||||
return 1;
|
return 1;
|
||||||
if (requirement == REQUIRES_RSA_SIG)
|
if (requirement == REQUIRES_RSA_SIG)
|
||||||
return 1;
|
return 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 :
|
case TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 :
|
||||||
if (requirement == ecc_static_diffie_hellman_kea)
|
if (requirement == REQUIRES_ECC_STATIC)
|
||||||
return 1;
|
return 1;
|
||||||
if (requirement == REQUIRES_RSA_SIG)
|
if (requirement == REQUIRES_RSA_SIG)
|
||||||
return 1;
|
return 1;
|
||||||
@ -6082,15 +6082,15 @@ int SetCipherList(Suites* s, const char* list)
|
|||||||
|
|
||||||
case TLS_RSA_WITH_AES_128_GCM_SHA256 :
|
case TLS_RSA_WITH_AES_128_GCM_SHA256 :
|
||||||
case TLS_RSA_WITH_AES_256_GCM_SHA384 :
|
case TLS_RSA_WITH_AES_256_GCM_SHA384 :
|
||||||
if (requirement == rsa_kea)
|
if (requirement == REQUIRES_RSA)
|
||||||
return 1;
|
return 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 :
|
case TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 :
|
||||||
case TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 :
|
case TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 :
|
||||||
if (requirement == rsa_kea)
|
if (requirement == REQUIRES_RSA)
|
||||||
return 1;
|
return 1;
|
||||||
if (requirement == diffie_hellman_kea)
|
if (requirement == REQUIRES_DHE)
|
||||||
return 1;
|
return 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -22,4 +22,5 @@ EXTRA_DIST += tests/test.conf \
|
|||||||
tests/test-psk.conf \
|
tests/test-psk.conf \
|
||||||
tests/test-ntru.conf \
|
tests/test-ntru.conf \
|
||||||
tests/test-ecc.conf \
|
tests/test-ecc.conf \
|
||||||
tests/test-aesgcm.conf
|
tests/test-aesgcm.conf \
|
||||||
|
tests/test-aesgcm-openssl.conf
|
||||||
|
@ -292,7 +292,7 @@ int SuiteTest(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_AESGCM
|
#ifdef HAVE_AESGCM
|
||||||
/* add ecc extra suites */
|
/* add aesgcm extra suites */
|
||||||
strcpy(argv0[1], "tests/test-aesgcm.conf");
|
strcpy(argv0[1], "tests/test-aesgcm.conf");
|
||||||
printf("starting aesgcm extra cipher suite tests\n");
|
printf("starting aesgcm extra cipher suite tests\n");
|
||||||
test_harness(&args);
|
test_harness(&args);
|
||||||
@ -302,6 +302,17 @@ int SuiteTest(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_AESGCM) && defined(OPENSSL_EXTRA)
|
||||||
|
/* add aesgcm openssl extra suites */
|
||||||
|
strcpy(argv0[1], "tests/test-aesgcm-openssl.conf");
|
||||||
|
printf("starting aesgcm openssl extra cipher suite tests\n");
|
||||||
|
test_harness(&args);
|
||||||
|
if (args.return_code != 0) {
|
||||||
|
printf("error from script %d\n", args.return_code);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
printf(" End Cipher Suite Tests\n");
|
printf(" End Cipher Suite Tests\n");
|
||||||
|
|
||||||
return args.return_code;
|
return args.return_code;
|
||||||
|
16
tests/test-aesgcm-openssl.conf
Normal file
16
tests/test-aesgcm-openssl.conf
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# server TLSv1.2 DHE-RSA-AES128-GCM-SHA256
|
||||||
|
-v 3
|
||||||
|
-l DHE-RSA-AES128-GCM-SHA256
|
||||||
|
|
||||||
|
# client TLSv1.2 DHE-RSA-AES128-GCM-SHA256
|
||||||
|
-v 3
|
||||||
|
-l DHE-RSA-AES128-GCM-SHA256
|
||||||
|
|
||||||
|
# server TLSv1.2 DHE-RSA-AES256-GCM-SHA384
|
||||||
|
-v 3
|
||||||
|
-l DHE-RSA-AES256-GCM-SHA384
|
||||||
|
|
||||||
|
# client TLSv1.2 DHE-RSA-AES256-GCM-SHA384
|
||||||
|
-v 3
|
||||||
|
-l DHE-RSA-AES256-GCM-SHA384
|
||||||
|
|
Reference in New Issue
Block a user