summaryrefslogtreecommitdiffstats
path: root/libmariadb/libmariadb/secure/ma_schannel.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmariadb/libmariadb/secure/ma_schannel.c')
-rw-r--r--libmariadb/libmariadb/secure/ma_schannel.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libmariadb/libmariadb/secure/ma_schannel.c b/libmariadb/libmariadb/secure/ma_schannel.c
index be4148c7..10ea3318 100644
--- a/libmariadb/libmariadb/secure/ma_schannel.c
+++ b/libmariadb/libmariadb/secure/ma_schannel.c
@@ -526,6 +526,13 @@ my_bool ma_schannel_verify_certs(MARIADB_TLS *ctls, BOOL verify_server_name)
end:
if (!ret)
{
+ /* postpone the error for self signed certificates if CA isn't set */
+ if (status == CERT_E_UNTRUSTEDROOT && !ca_file && !ca_path)
+ {
+ mysql->net.tls_self_signed_error= strdup(errmsg);
+ ret= 1;
+ }
+ else
pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, 0, errmsg);
}
if (pServerCert)