blob: 32dedff6b76e52f101228de35a3b73856ba78fc5 [file] [log] [blame]
diff --git a/src/include/common/openssl.h b/src/include/common/openssl.h
index fcc5b50..688dc21 100644
--- a/src/include/common/openssl.h
+++ b/src/include/common/openssl.h
@@ -39,7 +39,7 @@
#endif
/* src/common/protocol_openssl.c */
-#ifndef SSL_CTX_set_min_proto_version
+#if !defined(SSL_CTX_set_min_proto_version) && !defined(BAZEL_PQ_USE_BORINGSSL)
extern int SSL_CTX_set_min_proto_version(SSL_CTX *ctx, int version);
extern int SSL_CTX_set_max_proto_version(SSL_CTX *ctx, int version);
#endif
diff --git a/src/interfaces/libpq/fe-secure-openssl.c b/src/interfaces/libpq/fe-secure-openssl.c
index 5f34049..dcf2f18 100644
--- a/src/interfaces/libpq/fe-secure-openssl.c
+++ b/src/interfaces/libpq/fe-secure-openssl.c
@@ -1389,12 +1389,18 @@ open_client_SSL(PGconn *conn)
* codes listed here, but a hint about protocol
* versions seems like it's appropriate for all.
*/
+#ifndef BAZEL_PQ_USE_BORINGSSL
case SSL_R_NO_PROTOCOLS_AVAILABLE:
+#endif
case SSL_R_UNSUPPORTED_PROTOCOL:
+#ifndef BAZEL_PQ_USE_BORINGSSL
case SSL_R_BAD_PROTOCOL_VERSION_NUMBER:
+#endif
case SSL_R_UNKNOWN_PROTOCOL:
case SSL_R_UNKNOWN_SSL_VERSION:
+#ifndef BAZEL_PQ_USE_BORINGSSL
case SSL_R_UNSUPPORTED_SSL_VERSION:
+#endif
case SSL_R_WRONG_SSL_VERSION:
case SSL_R_WRONG_VERSION_NUMBER:
case SSL_R_TLSV1_ALERT_PROTOCOL_VERSION: