diff options
| author | Peter Eisentraut | 2019-01-31 23:17:45 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2019-01-31 23:33:47 +0000 |
| commit | f60a0e96778854ed0b7fd4737488ba88022e47bd (patch) | |
| tree | d4d25d5b3d8491ad24128bf8ed419938c6e9119d /src/include/pgstat.h | |
| parent | 00d1e88d36687ceae1be2317fac90e967941c085 (diff) | |
Add more columns to pg_stat_ssl
Add columns client_serial and issuer_dn to pg_stat_ssl. These allow
uniquely identifying the client certificate.
Rename the existing column clientdn to client_dn, to make the naming
more consistent and easier to read.
Discussion: https://www.postgresql.org/message-id/flat/[email protected]/
Diffstat (limited to 'src/include/pgstat.h')
| -rw-r--r-- | src/include/pgstat.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/include/pgstat.h b/src/include/pgstat.h index 0ce79489dad..88a75fb798e 100644 --- a/src/include/pgstat.h +++ b/src/include/pgstat.h @@ -950,15 +950,25 @@ typedef enum ProgressCommandType * * For each backend, we keep the SSL status in a separate struct, that * is only filled in if SSL is enabled. + * + * All char arrays must be null-terminated. */ typedef struct PgBackendSSLStatus { /* Information about SSL connection */ int ssl_bits; bool ssl_compression; - char ssl_version[NAMEDATALEN]; /* MUST be null-terminated */ - char ssl_cipher[NAMEDATALEN]; /* MUST be null-terminated */ - char ssl_clientdn[NAMEDATALEN]; /* MUST be null-terminated */ + char ssl_version[NAMEDATALEN]; + char ssl_cipher[NAMEDATALEN]; + char ssl_client_dn[NAMEDATALEN]; + + /* + * serial number is max "20 octets" per RFC 5280, so this size should be + * fine + */ + char ssl_client_serial[NAMEDATALEN]; + + char ssl_issuer_dn[NAMEDATALEN]; } PgBackendSSLStatus; |
