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
CONC-692: Provide X509 peer certificate information
Added a new structure MARIADB_X509_INFO, which contains information about servers certificate. The information can be obtained via mysql_get_infov API function: MARIADB_X509_INFO *info; mariadb_get_infov(mysql, MARIADB_TLS_PEER_CERT_INFO, &info);
This commit is contained in:
@@ -4519,6 +4519,11 @@ my_bool mariadb_get_infov(MYSQL *mysql, enum mariadb_value value, void *arg, ...
|
||||
va_start(ap, arg);
|
||||
|
||||
switch(value) {
|
||||
#ifdef HAVE_TLS
|
||||
case MARIADB_TLS_PEER_CERT_INFO:
|
||||
*((MARIADB_X509_INFO **)arg)= mysql->net.pvio->ctls ? (MARIADB_X509_INFO *)&mysql->net.pvio->ctls->cert_info : NULL;
|
||||
break;
|
||||
#endif
|
||||
case MARIADB_MAX_ALLOWED_PACKET:
|
||||
*((size_t *)arg)= (size_t)max_allowed_packet;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user