mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Extract common bits from OpenSSL implementation
Some things in be-secure-openssl.c and fe-secure-openssl.c were not actually specific to OpenSSL but could also be used by other implementations. In order to avoid copy-and-pasting, move some of that code to common files.
This commit is contained in:
@ -1547,14 +1547,6 @@ SSLerrfree(char *buf)
|
||||
/* SSL information functions */
|
||||
/* ------------------------------------------------------------ */
|
||||
|
||||
int
|
||||
PQsslInUse(PGconn *conn)
|
||||
{
|
||||
if (!conn)
|
||||
return 0;
|
||||
return conn->ssl_in_use;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return pointer to OpenSSL object.
|
||||
*/
|
||||
|
@ -129,6 +129,14 @@ struct sigpipe_info
|
||||
/* ------------------------------------------------------------ */
|
||||
|
||||
|
||||
int
|
||||
PQsslInUse(PGconn *conn)
|
||||
{
|
||||
if (!conn)
|
||||
return 0;
|
||||
return conn->ssl_in_use;
|
||||
}
|
||||
|
||||
/*
|
||||
* Exported function to allow application to tell us it's already
|
||||
* initialized OpenSSL.
|
||||
@ -384,12 +392,6 @@ retry_masked:
|
||||
/* Dummy versions of SSL info functions, when built without SSL support */
|
||||
#ifndef USE_SSL
|
||||
|
||||
int
|
||||
PQsslInUse(PGconn *conn)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void *
|
||||
PQgetssl(PGconn *conn)
|
||||
{
|
||||
|
Reference in New Issue
Block a user