summaryrefslogtreecommitdiff
path: root/net-misc/tn5250/files/tn5250-0.17.4-openssl11.patch
blob: 8c6d0fde1c708aa9b741ecbe7677a578a7a20df7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From 5922e57bb5ea78ff35f82a60f1721d533cc0584a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Mon, 20 Feb 2017 15:37:51 +0100
Subject: [PATCH 4/4] port to OpenSSL 1.1

- check for better functions in configure
- update SSL initialization call
---
 configure.ac        | 8 ++++----
 lib5250/sslstream.c | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 4ba0007..8a16cff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -152,13 +152,13 @@ dnl ** happily, we don't have to hunt for them thanks to ldconfig!
 dnl **
 if test -n $sslincludedir; then
      CPPFLAGS="$CPPFLAGS $sslincludedir"
-     AC_CHECK_LIB(crypto,CRYPTO_num_locks)
-     if test "$ac_cv_lib_crypto_CRYPTO_num_locks" != "yes"
+     AC_CHECK_LIB(crypto,OPENSSL_init)
+     if test "$ac_cv_lib_crypto_OPENSSL_init" != "yes"
      then
              AC_MSG_ERROR([** Unable to find OpenSSL libraries!])
      fi
-     AC_CHECK_LIB(ssl,SSL_library_init)
-     if test "$ac_cv_lib_ssl_SSL_library_init" != "yes"
+     AC_CHECK_LIB(ssl,OPENSSL_init_ssl)
+     if test "$ac_cv_lib_ssl_OPENSSL_init_ssl" != "yes"
      then
              AC_MSG_ERROR([** Unable to find OpenSSL libraries!])
      fi
diff --git a/lib5250/sslstream.c b/lib5250/sslstream.c
index 86d38cf..3c0f390 100644
--- a/lib5250/sslstream.c
+++ b/lib5250/sslstream.c
@@ -368,7 +368,7 @@ int tn5250_ssl_stream_init (Tn5250Stream *This)
 /*  initialize SSL library */
 
    SSL_load_error_strings();
-   SSL_library_init();
+   OPENSSL_init_ssl(0, NULL);
 
 /*  which SSL method do we use? */
 
-- 
2.7.4