1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-12 21:01:52 +03:00

Add libpq connection option to disable SSL compression

This can be used to remove the overhead of SSL compression on
fast networks.

Laurenz Albe
This commit is contained in:
Magnus Hagander
2011-11-28 13:13:42 +01:00
parent dd3bab5fd7
commit 64aea1ebc7
4 changed files with 48 additions and 0 deletions

View File

@ -1292,6 +1292,16 @@ initialize_SSL(PGconn *conn)
}
}
/*
* If the OpenSSL version used supports it (from 1.0.0 on)
* and the user requested it, disable SSL compression.
*/
#ifdef SSL_OP_NO_COMPRESSION
if (conn->sslcompression && conn->sslcompression[0] == '0') {
SSL_set_options(conn->ssl, SSL_OP_NO_COMPRESSION);
}
#endif
return 0;
}