@@ -1404,6 +1404,7 @@ set_auto_encryption_opts (mongoc_client_t *client, bson_t *test)
1404
1404
bson_error_t error ;
1405
1405
bool ret ;
1406
1406
bson_t extra ;
1407
+ bson_t tls_opts = BSON_INITIALIZER ;
1407
1408
1408
1409
if (!bson_has_field (test , "clientOptions.autoEncryptOpts" )) {
1409
1410
return ;
@@ -1527,11 +1528,13 @@ set_auto_encryption_opts (mongoc_client_t *client, bson_t *test)
1527
1528
1528
1529
bson_concat (
1529
1530
& kms_providers ,
1530
- tmp_bson ("{ 'kmip': { 'endpoint': '%s', 'tls': { 'tlsCAFile': "
1531
- "'%s', 'tlsCertificateKeyFile': '%s' } } }" ,
1532
- kmip_endpoint ,
1533
- kmip_tls_ca_file ,
1534
- kmip_tls_certificate_key_file ));
1531
+ tmp_bson ("{ 'kmip': { 'endpoint': '%s' }}" , kmip_endpoint ));
1532
+
1533
+ bson_concat (& tls_opts ,
1534
+ tmp_bson ("{'kmip': { 'tlsCAFile': '%s', "
1535
+ "'tlsCertificateKeyFile': '%s' } }" ,
1536
+ kmip_tls_ca_file ,
1537
+ kmip_tls_certificate_key_file ));
1535
1538
1536
1539
bson_free (kmip_endpoint );
1537
1540
bson_free (kmip_tls_ca_file );
@@ -1540,7 +1543,9 @@ set_auto_encryption_opts (mongoc_client_t *client, bson_t *test)
1540
1543
1541
1544
mongoc_auto_encryption_opts_set_kms_providers (auto_encryption_opts ,
1542
1545
& kms_providers );
1546
+ mongoc_auto_encryption_opts_set_tls_opts (auto_encryption_opts , & tls_opts );
1543
1547
bson_destroy (& kms_providers );
1548
+ bson_destroy (& tls_opts );
1544
1549
}
1545
1550
1546
1551
if (bson_iter_init_find (& iter , & opts , "schemaMap" )) {
0 commit comments