You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-07 02:42:49 +03:00
CONC-747: Change behaviour of MARIADB_TLS_DISABLE_PEER_VERIFICATION
Instead of skipping the verification during handshake, tls_allow_invalid_server_certificate will be unset during initialization of the connection handle if environment varible MARIADB_TLS_DISABLE_PEER_VERIFICATION was set. This will allow drivers and applications which don't have an API option to enable/disable peer server certificate verification to start without TLS/SSL.
This commit is contained in:
@@ -715,7 +715,8 @@ struct st_default_options mariadb_defaults[] =
|
||||
};
|
||||
|
||||
#ifdef DEFAULT_SSL_VERIFY_SERVER_CERT
|
||||
#define FIX_SSL_VERIFY_SERVER_CERT(OPTS)
|
||||
#define FIX_SSL_VERIFY_SERVER_CERT(OPTS)\
|
||||
(OPTS)->extension->tls_allow_invalid_server_cert= (getenv("MARIADB_TLS_DISABLE_PEER_VERIFICATION") != NULL)
|
||||
#else
|
||||
#define FIX_SSL_VERIFY_SERVER_CERT(OPTS) (OPTS)->extension->tls_allow_invalid_server_cert=1
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user