Skip to content

Commit cb1a473

Browse files
authored
Merge pull request #311 from rsyslog/codex/fix-openssl-default-ca-trust-vulnerability
openssl: avoid loading system default CAs when no CA file is configured
2 parents a4c0d6c + 1dee790 commit cb1a473

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

src/tcp.c

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1498,16 +1498,9 @@ relpTcpInitTLS(relpTcp_t *const pThis)
14981498
(char*)"relpTcpInitTLS: Successfully initialized CA Certificate #2\n");
14991499
}
15001500

1501-
// Init local System default certificate storage instead.
1502-
if (SSL_CTX_set_default_verify_paths(ctx) != 1) {
1503-
callOnErr(pThis, (char*)"relpTcpInitTLS: Error, CA default certificate storage "
1504-
"could not be set.", RELP_RET_ERR_TLS_SETUP);
1505-
/* Output Additional OpenSSL output */
1506-
relpTcpLastSSLErrorMsg(0, pThis, "relpTcpInitTLS");
1507-
ABORT_FINALIZE(RELP_RET_ERR_TLS_SETUP);
1508-
} else
1509-
pThis->pEngine->dbgprint((char*)"relpTcpInitTLS: Successfully initialized default "
1510-
"CA certificate storage\n");
1501+
if(pThis->ownCertFile == NULL) {
1502+
pThis->pEngine->dbgprint((char*)"relpTcpInitTLS: CA certificate MISSING\n");
1503+
}
15111504
}
15121505
finalize_it:
15131506
LEAVE_RELPFUNC;

0 commit comments

Comments
 (0)