提交 cb5d1db9 编写于 作者: H Heikki Linnakangas

Remove work arounds for SSL_get_current_compression.

gpcloud uses OpenSSL's libcrypto, even if you ran configure
--without-openssl. The #include <openssl/ssl.h> in gpcloud clashed with
the #define in port.h. I suspect the "ssl.h" was a typo, and should've been
"sha.h", because gpcloud only uses OpenSSL for the hash functions. Change
it that way.

It's a bit bogus that it builds with libcrypto, even if you specified no
OpenSSL support in configure, but
Reviewed-by: NDaniel Gustafsson <dgustafsson@pivotal.io>
上级 492059c9
......@@ -7,7 +7,7 @@
#include <libxml/tree.h>
#include <openssl/hmac.h>
#include <openssl/md5.h>
#include <openssl/ssl.h>
#include <openssl/sha.h>
#include <pthread.h>
#include <zlib.h>
#include <algorithm>
......
......@@ -282,14 +282,11 @@ PerformAuthentication(Port *port)
if (am_walsender)
{
#ifdef USE_SSL
/*
* GPDB_94_MERGE_FIXME: Some versions of gcc do not support the same
* syntax for such macros and function names. Temporary wolk around.
*/
if (port->ssl)
ereport(LOG,
(errmsg("replication connection authorized: user=%s SSL enabled (protocol=%s, cipher=%s)",
port->user_name, SSL_get_version(port->ssl), SSL_get_cipher(port->ssl))));
(errmsg("replication connection authorized: user=%s SSL enabled (protocol=%s, cipher=%s, compression=%s)",
port->user_name, SSL_get_version(port->ssl), SSL_get_cipher(port->ssl),
SSL_get_current_compression(port->ssl) ? _("on") : _("off"))));
else
#endif
ereport(LOG,
......@@ -301,8 +298,9 @@ PerformAuthentication(Port *port)
#ifdef USE_SSL
if (port->ssl)
ereport(LOG,
(errmsg("connection authorized: user=%s database=%s SSL enabled (protocol=%s, cipher=%s)",
port->user_name, port->database_name, SSL_get_version(port->ssl), SSL_get_cipher(port->ssl))));
(errmsg("connection authorized: user=%s database=%s SSL enabled (protocol=%s, cipher=%s, compression=%s)",
port->user_name, port->database_name, SSL_get_version(port->ssl), SSL_get_cipher(port->ssl),
SSL_get_current_compression(port->ssl) ? _("on") : _("off"))));
else
#endif
ereport(LOG,
......
......@@ -1911,12 +1911,9 @@ printSSLInfo(void)
return; /* no SSL */
SSL_get_cipher_bits(ssl, &sslbits);
/*
* GPDB_94_MERGE_FIXME: Some versions of gcc do not support the same
* syntax for such macros and function names. Temporary wolk around.
*/
printf(_("SSL connection (protocol: %s, cipher: %s, bits: %d)\n"),
SSL_get_version(ssl), SSL_get_cipher(ssl), sslbits);
printf(_("SSL connection (protocol: %s, cipher: %s, bits: %d, compression: %s)\n"),
SSL_get_version(ssl), SSL_get_cipher(ssl), sslbits,
SSL_get_current_compression(ssl) ? _("on") : _("off"));
#else
/*
......
......@@ -426,15 +426,9 @@ extern void unsetenv(const char *name);
extern void srandom(unsigned int seed);
#endif
/*
* GPDB_94_MERGE_FIXME: Some versions of gcc do not support the same
* syntax for such macros and function names. Temporary wolk around.
*/
#if 0
#ifndef HAVE_SSL_GET_CURRENT_COMPRESSION
#define SSL_get_current_compression(x) 0
#endif
#endif
/* thread.h */
extern char *pqStrerror(int errnum, char *strerrbuf, size_t buflen);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册