]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Hasso Tepper <hasso@estpak.ee>
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 23 Apr 2009 08:15:53 +0000 (20:15 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 23 Apr 2009 08:15:53 +0000 (20:15 +1200)
Fix OpenSSL portability problem

Received via NetBSD project.

Their CVS log attributes says, the fix is from hasso@estpak.ee:

| Fix two problems reported by Hasso Tepper via PR pkg/39554.
|
| * OpenSSL portability problem.

(other not relevant to this patch)

src/ssl_support.cc

index 1563ee176c1d8ed27b797c0b42015317e57ea216..fa76d97e7f6eab7f368f675709b29db6c5995682 100644 (file)
@@ -638,7 +638,11 @@ SSL_CTX *
 sslCreateServerContext(const char *certfile, const char *keyfile, int version, const char *cipher, const char *options, const char *flags, const char *clientCA, const char *CAfile, const char *CApath, const char *CRLfile, const char *dhfile, const char *context)
 {
     int ssl_error;
+#if OPENSSL_VERSION_NUMBER < 0x00909000L
     SSL_METHOD *method;
+#else
+    const SSL_METHOD *method;
+#endif
     SSL_CTX *sslContext;
     long fl = ssl_parse_flags(flags);
 
@@ -835,7 +839,11 @@ SSL_CTX *
 sslCreateClientContext(const char *certfile, const char *keyfile, int version, const char *cipher, const char *options, const char *flags, const char *CAfile, const char *CApath, const char *CRLfile)
 {
     int ssl_error;
+#if OPENSSL_VERSION_NUMBER < 0x00909000L
     SSL_METHOD *method;
+#else
+    const SSL_METHOD *method;
+#endif
     SSL_CTX *sslContext;
     long fl = ssl_parse_flags(flags);