From: Viktor Dukhovni Date: Thu, 4 Feb 2016 09:00:27 +0000 (-0500) Subject: Bitrot: session_id constification in callbacks X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45951fb55e65a3e800d8ec2e6c5a40d617fe97be;p=thirdparty%2Fpostfix.git Bitrot: session_id constification in callbacks --- diff --git a/postfix/src/tls/tls_server.c b/postfix/src/tls/tls_server.c index 71543b9c9..7f5360e28 100644 --- a/postfix/src/tls/tls_server.c +++ b/postfix/src/tls/tls_server.c @@ -173,9 +173,16 @@ static const char server_session_id_context[] = "Postfix/TLS"; #endif /* OPENSSL_VERSION_NUMBER */ + /* OpenSSL 1.1.0 bitrot */ +#if OPENSSL_VERSION_NUMBER >= 0x10100000L +typedef const unsigned char *session_id_t; +#else +typedef unsigned char *session_id_t; +#endif + /* get_server_session_cb - callback to retrieve session from server cache */ -static SSL_SESSION *get_server_session_cb(SSL *ssl, unsigned char *session_id, +static SSL_SESSION *get_server_session_cb(SSL *ssl, session_id_t session_id, int session_id_length, int *unused_copy) {