Skip to content

Commit a3c8a76

Browse files
committed
CDRIVER-2162 Import the CA store regardless if the root store failed
1 parent e2ae558 commit a3c8a76

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/mongoc/mongoc-openssl.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,10 @@ _mongoc_openssl_import_cert_stores (SSL_CTX *context)
175175
CERT_SYSTEM_STORE_CURRENT_USER |
176176
CERT_STORE_READONLY_FLAG,
177177
store);
178-
if (retval) {
179-
return retval;
180-
}
181-
return _mongoc_openssl_import_cert_store (
178+
retval &= _mongoc_openssl_import_cert_store (
182179
L"CA", CERT_SYSTEM_STORE_CURRENT_USER | CERT_STORE_READONLY_FLAG, store);
180+
181+
return retval;
183182
}
184183
#endif
185184

@@ -317,7 +316,7 @@ _mongoc_openssl_check_cert (SSL *ssl,
317316
if (name->type == target) {
318317
const char *check;
319318

320-
check = (const char *)ASN1_STRING_get0_data (name->d.ia5);
319+
check = (const char *) ASN1_STRING_get0_data (name->d.ia5);
321320
length = ASN1_STRING_length (name->d.ia5);
322321

323322
switch (target) {

0 commit comments

Comments
 (0)