File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,7 +99,6 @@ jlong JNICALL Java_software_amazon_awssdk_crt_io_TlsContextOptions_tlsContextOpt
9999 struct aws_allocator * allocator = aws_jni_get_allocator ();
100100 struct jni_tls_ctx_options * tls = aws_mem_calloc (allocator , 1 , sizeof (struct jni_tls_ctx_options ));
101101 AWS_FATAL_ASSERT (tls );
102- aws_tls_ctx_options_init_default_client (& tls -> options , allocator );
103102
104103 /* Certs or paths will cause an init, which overwrites other fields, so do those first */
105104 if (jni_certificate && jni_private_key ) {
@@ -257,6 +256,9 @@ jlong JNICALL Java_software_amazon_awssdk_crt_io_TlsContextOptions_tlsContextOpt
257256 aws_jni_throw_runtime_exception (env , "aws_tls_ctx_options_init_client_mtls_from_system_path failed" );
258257 goto on_error ;
259258 }
259+ } else {
260+ /* no mTLS */
261+ aws_tls_ctx_options_init_default_client (& tls -> options , allocator );
260262 }
261263
262264 if (jni_ca ) {
You can’t perform that action at this time.
0 commit comments