summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d52dc4b)
raw | patch | inline | side by side (parent: d52dc4b)
author | Vietor Liu <vietor@vxwo.org> | |
Sat, 31 Oct 2009 06:36:03 +0000 (14:36 +0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 31 Oct 2009 21:28:18 +0000 (14:28 -0700) |
The openssl/CHANGES file says:
Let the TLSv1_method() etc. functions return a 'const' SSL_METHOD
pointer and make the SSL_METHOD parameter in SSL_CTX_new,
SSL_CTX_set_ssl_version and SSL_set_ssl_method 'const'.
In older versions, unqualified pointers were used, so we unfortunately
cannot unconditionally update the type of the variable we use.
Signed-off-by: Vietor Liu <vietor@vxwo.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Let the TLSv1_method() etc. functions return a 'const' SSL_METHOD
pointer and make the SSL_METHOD parameter in SSL_CTX_new,
SSL_CTX_set_ssl_version and SSL_set_ssl_method 'const'.
In older versions, unqualified pointers were used, so we unfortunately
cannot unconditionally update the type of the variable we use.
Signed-off-by: Vietor Liu <vietor@vxwo.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
imap-send.c | patch | blob | history |
diff --git a/imap-send.c b/imap-send.c
index 3847fd151df6e9f41fdb0b95573882a7d9ac992a..f805c6ed813bbc6130bcd2d9f89bdb44ad9625e1 100644 (file)
--- a/imap-send.c
+++ b/imap-send.c
@@ -272,8 +272,12 @@ static int ssl_socket_connect(struct imap_socket *sock, int use_tls_only, int ve
#ifdef NO_OPENSSL
fprintf(stderr, "SSL requested but SSL support not compiled in\n");
return -1;
+#else
+#if (OPENSSL_VERSION_NUMBER >= 0x10000000L)
+ const SSL_METHOD *meth;
#else
SSL_METHOD *meth;
+#endif
SSL_CTX *ctx;
int ret;