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:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user