git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
OpenSSL 1.0.0 const fix for SSL_get_current_cipher
[exim.git]
/
src
/
src
/
tls-openssl.c
diff --git
a/src/src/tls-openssl.c
b/src/src/tls-openssl.c
index 3ea55f23841e59b820ee3802e61837bd2ffbea60..b6a8dcb8c74e085ca4f17f0378665e43c1d79f1e 100644
(file)
--- a/
src/src/tls-openssl.c
+++ b/
src/src/tls-openssl.c
@@
-438,7
+438,10
@@
static void
construct_cipher_name(SSL *ssl)
{
static uschar cipherbuf[256];
construct_cipher_name(SSL *ssl)
{
static uschar cipherbuf[256];
-SSL_CIPHER *c;
+/* With OpenSSL 1.0.0a, this needs to be const but the documentation doesn't
+yet reflect that. It should be a safe change anyway, even 0.9.8 versions have
+the accessor functions use const in the prototype. */
+const SSL_CIPHER *c;
uschar *ver;
int bits;
uschar *ver;
int bits;
@@
-460,7
+463,7
@@
switch (ssl->session->ssl_version)
ver = US"UNKNOWN";
}
ver = US"UNKNOWN";
}
-c = SSL_get_current_cipher(ssl);
+c =
(const SSL_CIPHER *)
SSL_get_current_cipher(ssl);
SSL_CIPHER_get_bits(c, &bits);
string_format(cipherbuf, sizeof(cipherbuf), "%s:%s:%u", ver,
SSL_CIPHER_get_bits(c, &bits);
string_format(cipherbuf, sizeof(cipherbuf), "%s:%s:%u", ver,