From 67da2748dd7d0a0dff6fdb87925e8f3d1b04d035 Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Tue, 7 May 2024 22:09:40 +0200 Subject: [PATCH] Update other-functions.md Update showCertificate documentation --- .../functions/other-functions.md | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/docs/en/sql-reference/functions/other-functions.md b/docs/en/sql-reference/functions/other-functions.md index ba613b619be..11ee471d709 100644 --- a/docs/en/sql-reference/functions/other-functions.md +++ b/docs/en/sql-reference/functions/other-functions.md @@ -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'} +```