# mysql\_get\_ssl\_cipher

## Syntax

```c
const char *mysql_get_ssl_cipher(MYSQL *mysql)
```

* `mysql` - a mysql handle, which was previously allocated by [mysql\_init()](https://mariadb.com/docs/connectors/mariadb-connector-c/api-functions/mysql_init) or [mysql\_real\_connect()](https://mariadb.com/docs/connectors/mariadb-connector-c/api-functions/mysql_real_connect).

## Description

Returns the name of the currently used cipher of the [TLS connection](https://app.gitbook.com/s/SsmexDFPv2xG2OTyO5yV/security/encryption/data-in-transit-encryption/secure-connections-overview), or NULL for non TLS connections.

## See also

* [mysql\_ssl\_set()](https://mariadb.com/docs/connectors/mariadb-connector-c/api-functions/mysql_ssl_set)

{% @marketo/form formId="4316" %}
