diff options
| author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2014-11-25 09:39:31 +0200 |
|---|---|---|
| committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2014-11-25 09:46:11 +0200 |
| commit | e453cc2741416dc784842b2bba68749556cf0f6f (patch) | |
| tree | 7854350915ddb4668cc2eaa559d41c3ee1925870 /src/include/libpq | |
| parent | f5d9698a8400972bd604069a3f15ca33e535ea6e (diff) | |
| download | postgresql-e453cc2741416dc784842b2bba68749556cf0f6f.tar.gz | |
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.
Diffstat (limited to 'src/include/libpq')
| -rw-r--r-- | src/include/libpq/libpq-be.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/include/libpq/libpq-be.h b/src/include/libpq/libpq-be.h index 34e52e44b0..e81f077f98 100644 --- a/src/include/libpq/libpq-be.h +++ b/src/include/libpq/libpq-be.h @@ -184,14 +184,16 @@ typedef struct Port #endif /* - * SSL structures (keep these last so that the locations of other fields - * are the same whether or not you build with SSL) + * SSL structures. */ -#ifdef USE_SSL bool ssl_in_use; char *peer_cn; bool peer_cert_valid; -#endif + + /* + * OpenSSL structures. (Keep these last so that the locations of other + * fields are the same whether or not you build with OpenSSL.) + */ #ifdef USE_OPENSSL SSL *ssl; X509 *peer; |
