@@ -2642,17 +2642,12 @@ static int s_tls_destroy_null_context(struct aws_allocator *allocator, void *ctx
26422642}
26432643AWS_TEST_CASE (tls_destroy_null_context , s_tls_destroy_null_context );
26442644
2645- static int s_test_ecc_cert_import (struct aws_allocator * allocator , void * ctx ) {
2646- (void )ctx ;
2647- (void )allocator ;
2648-
2649- aws_io_library_init (allocator );
2650-
2645+ static int s_test_ecc_import (struct aws_allocator * allocator , const char * key_path , const char * cert_path ) {
26512646 struct aws_byte_buf cert_buf ;
26522647 struct aws_byte_buf key_buf ;
26532648
2654- ASSERT_SUCCESS (aws_byte_buf_init_from_file (& cert_buf , allocator , "ecc-cert.pem" ));
2655- ASSERT_SUCCESS (aws_byte_buf_init_from_file (& key_buf , allocator , "ecc-key.pem" ));
2649+ ASSERT_SUCCESS (aws_byte_buf_init_from_file (& cert_buf , allocator , cert_path ));
2650+ ASSERT_SUCCESS (aws_byte_buf_init_from_file (& key_buf , allocator , key_path ));
26562651
26572652 struct aws_byte_cursor cert_cur = aws_byte_cursor_from_buf (& cert_buf );
26582653 struct aws_byte_cursor key_cur = aws_byte_cursor_from_buf (& key_buf );
@@ -2676,7 +2671,19 @@ static int s_test_ecc_cert_import(struct aws_allocator *allocator, void *ctx) {
26762671 return AWS_OP_SUCCESS ;
26772672}
26782673
2679- AWS_TEST_CASE (test_ecc_cert_import , s_test_ecc_cert_import )
2674+ static int s_test_ecc_p256_cert_import (struct aws_allocator * allocator , void * ctx ) {
2675+ (void )ctx ;
2676+ return s_test_ecc_import (allocator , "ecc-key.pem" , "ecc-cert.pem" );
2677+ }
2678+
2679+ AWS_TEST_CASE (test_ecc_p256_cert_import , s_test_ecc_p256_cert_import )
2680+
2681+ static int s_test_ecc_p384_cert_import (struct aws_allocator * allocator , void * ctx ) {
2682+ (void )ctx ;
2683+ return s_test_ecc_import (allocator , "ecc-key-384.pem" , "ecc-cert-384.pem" );
2684+ }
2685+
2686+ AWS_TEST_CASE (test_ecc_p384_cert_import , s_test_ecc_p384_cert_import )
26802687
26812688static int s_test_pkcs12_import (struct aws_allocator * allocator , void * ctx ) {
26822689 (void )ctx ;
0 commit comments