]> 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>
Sun, 14 Oct 2018 15:50:09 +0000 (11:50 -0400)
postfix/src/tls/tls_server.c

index 8320aea534d34caccf48165785cc32f5105ed6d8..d8866fe9ab760f7573036acfe1407b0c9e295e7a 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)
 {