]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
Bitrot: session_id constification in callbacks
authorViktor Dukhovni <postfix-users@dukhovni.org>
Thu, 4 Feb 2016 09:00:27 +0000 (04:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Thu, 26 May 2016 04:41:54 +0000 (00:41 -0400)
postfix/src/tls/tls_server.c

index 720b0b8ac20dc7edaf445ebe22db11db5b3c39f1..34e27ce2c41788a130e6e2e479fc257e8069bbb8 100644 (file)
@@ -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)
 {