1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

Make Port->ssl_in_use available, even when built with !USE_SSL

Code that check the flag no longer need #ifdef's, which is more convenient.
In particular, makes it easier to write extensions that depend on it.

In the passing, modify sslinfo's ssl_is_used function to check ssl_in_use
instead of the OpenSSL specific 'ssl' pointer. It doesn't make any
difference currently, as sslinfo is only compiled when built with OpenSSL,
but seems cleaner anyway.
This commit is contained in:
Heikki Linnakangas
2014-11-25 09:39:31 +02:00
parent f5d9698a84
commit e453cc2741
3 changed files with 8 additions and 14 deletions

View File

@ -35,7 +35,7 @@ PG_FUNCTION_INFO_V1(ssl_is_used);
Datum
ssl_is_used(PG_FUNCTION_ARGS)
{
PG_RETURN_BOOL(MyProcPort->ssl != NULL);
PG_RETURN_BOOL(MyProcPort->ssl_in_use);
}