From 7e66928afe35e9d272237ea5c2a9bc97083bf513 Mon Sep 17 00:00:00 2001 From: Daniel Gustafsson Date: Thu, 16 Apr 2020 14:13:34 +0200 Subject: [PATCH] Wrap OpenSSL specific hook in USE_OPENSSL guards The openssl_tls_init_hook hook is specific to the OpenSSL backend, and will cause compilation failures for other backends should they be implemented. Wrap the hook in USE_OPENSSL guards to keep the TLS backend library agnostic. --- src/include/libpq/libpq-be.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/include/libpq/libpq-be.h b/src/include/libpq/libpq-be.h index 67697836ba..0a65cc17f7 100644 --- a/src/include/libpq/libpq-be.h +++ b/src/include/libpq/libpq-be.h @@ -287,9 +287,11 @@ extern void be_tls_get_peer_serial(Port *port, char *ptr, size_t len); extern char *be_tls_get_certificate_hash(Port *port, size_t *len); #endif +#if defined(USE_OPENSSL) /* init hook for SSL, the default sets the password callback if appropriate */ typedef void(* openssl_tls_init_hook_typ)(SSL_CTX *context, bool isServerStart); extern PGDLLIMPORT openssl_tls_init_hook_typ openssl_tls_init_hook; +#endif #endif /* USE_SSL */ -- 2.21.1 (Apple Git-122.3)