Update other-functions.md

Update showCertificate documentation
This commit is contained in:
Shaun Struwig 2024-05-07 22:09:40 +02:00 committed by GitHub
parent 5eaf944b99
commit 67da2748dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3304,7 +3304,7 @@ If the function is used in the context of a distributed query, it returns non-em
## showCertificate
Shows the current server's SSL certificate if it has been configured.
Shows information about the current server's Secure Sockets Layer (SSL) certificate if it has been configured. See [Configuring SSL-TLS](https://clickhouse.com/docs/en/guides/sre/configuring-ssl) for more information on how to configure ClickHouse to use OpenSSL certificates to validate connections.
**Syntax**
@ -3312,10 +3312,20 @@ Shows the current server's SSL certificate if it has been configured.
showCertificate()
```
**Parameters**
- None.
**Returned value**
- SSL certificate. [String](../../sql-reference/data-types/string.md).
- Map of key-value pairs relating to the configured SSL certificate. [Map](../../sql-reference/data-types/map.md)([String](../../sql-reference/data-types/string.md), [String](../../sql-reference/data-types/string.md)).
**Example**
Query:
```sql
SELECT showCertificate() FORMAT LineAsString;
```
Result:
```response
{'version':'1','serial_number':'2D9071D64530052D48308473922C7ADAFA85D6C5','signature_algo':'sha256WithRSAEncryption','issuer':'/CN=marsnet.local CA','not_before':'May 7 17:01:21 2024 GMT','not_after':'May 7 17:01:21 2025 GMT','subject':'/CN=chnode1','pkey_algo':'rsaEncryption'}
```