You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-08 14:02:17 +03:00
Don't load certificates in global context.
This commit is contained in:
@@ -485,8 +485,10 @@ static int ma_tls_set_certs(MYSQL *mysql, SSL *ssl)
|
||||
/* set cert */
|
||||
if (certfile && certfile[0] != 0)
|
||||
{
|
||||
if (SSL_CTX_use_certificate_chain_file(ctx, certfile) != 1)
|
||||
if (SSL_use_certificate_chain_file(ssl, certfile) != 1)
|
||||
{
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyfile && keyfile[0])
|
||||
@@ -527,7 +529,8 @@ static int ma_tls_set_certs(MYSQL *mysql, SSL *ssl)
|
||||
mysql->options.extension->ssl_crlpath) == 0)
|
||||
goto error;
|
||||
|
||||
X509_STORE_set_flags(certstore, X509_V_FLAG_CRL_CHECK | X509_V_FLAG_CRL_CHECK_ALL);
|
||||
if (X509_STORE_set_flags(certstore, X509_V_FLAG_CRL_CHECK | X509_V_FLAG_CRL_CHECK_ALL) == 0)
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, NULL);
|
||||
|
Reference in New Issue
Block a user