Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/gnu/dist/postfix/src/tls Added an OpenSSL version number che...



details:   https://anonhg.NetBSD.org/src/rev/d03500d6e400
branches:  trunk
changeset: 583666:d03500d6e400
user:      rpaulo <rpaulo%NetBSD.org@localhost>
date:      Thu Aug 18 22:29:08 2005 +0000

description:
Added an OpenSSL version number check so that we pass the second argument to
d2i_SSL_SESSION() correctly.
>From postfix-2.3-20050726.
Suggested by Wietse Venema in private email.

diffstat:

 gnu/dist/postfix/src/tls/tls_session.c |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 0c01839395c7 -r d03500d6e400 gnu/dist/postfix/src/tls/tls_session.c
--- a/gnu/dist/postfix/src/tls/tls_session.c    Thu Aug 18 22:06:28 2005 +0000
+++ b/gnu/dist/postfix/src/tls/tls_session.c    Thu Aug 18 22:29:08 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tls_session.c,v 1.1.1.1 2005/08/18 21:11:10 rpaulo Exp $       */
+/*     $NetBSD: tls_session.c,v 1.2 2005/08/18 22:29:08 rpaulo Exp $   */
 
 /*++
 /* NAME
@@ -163,13 +163,18 @@
 
 SSL_SESSION *tls_session_activate(char *session_data, int session_data_len)
 {
+#if (OPENSSL_VERSION_NUMBER < 0x0090707fL)
+#define BOGUS_CONST
+#else
+#define BOGUS_CONST const
+#endif
     SSL_SESSION *session;
-    unsigned char *ptr;
+    BOGUS_CONST unsigned char *ptr;
 
     /*
      * Activate the SSL_SESSION object.
      */
-    ptr = (unsigned char *) session_data;
+    ptr = (BOGUS_CONST unsigned char *) session_data;
     session = d2i_SSL_SESSION((SSL_SESSION **) 0, &ptr, session_data_len);
     if (!session)
        tls_print_errors();



Home | Main Index | Thread Index | Old Index