summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-secure.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/libpq/fe-secure.c')
-rw-r--r--src/interfaces/libpq/fe-secure.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/interfaces/libpq/fe-secure.c b/src/interfaces/libpq/fe-secure.c
index 9c6ced6a828..c6963bed948 100644
--- a/src/interfaces/libpq/fe-secure.c
+++ b/src/interfaces/libpq/fe-secure.c
@@ -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;
}