From patchwork Sun Nov 26 04:04:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steffan Karger X-Patchwork-Id: 98 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director2.mail.ord1d.rsapps.net ([172.30.191.6]) by backend31.mail.ord1d.rsapps.net (Dovecot) with LMTP id c6tFISPYGlqCbgAAgoeIoA for ; Sun, 26 Nov 2017 10:05:07 -0500 Received: from proxy5.mail.ord1d.rsapps.net ([172.30.191.6]) by director2.mail.ord1d.rsapps.net (Dovecot) with LMTP id cy8wISPYGlrgGQAAgYhSiA ; Sun, 26 Nov 2017 10:05:07 -0500 Received: from smtp15.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy5.mail.ord1d.rsapps.net (Dovecot) with LMTP id 407uDyPYGlrqawAA8Zzt7w ; Sun, 26 Nov 2017 10:05:07 -0500 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.34.181.88] Authentication-Results: smtp15.gate.ord1d.rsapps.net; iprev=pass policy.iprev="216.34.181.88"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dkim=fail (signature verification failed) header.d=karger-me.20150623.gappssmtp.com; dmarc=none (p=nil; dis=none) header.from=karger.me X-Classification-ID: 303dfe1c-d2bb-11e7-a424-5254007ab6c8-1-1 Received: from [216.34.181.88] ([216.34.181.88:40300] helo=lists.sourceforge.net) by smtp15.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.1.56364 r(Core:4.2.1.14)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 00/EF-09219-228DA1A5; Sun, 26 Nov 2017 10:05:06 -0500 Received: from localhost ([127.0.0.1] helo=sfs-ml-1.v29.ch3.sourceforge.com) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.89) (envelope-from ) id 1eIyTk-0003j2-NG; Sun, 26 Nov 2017 15:04:20 +0000 Received: from sfi-mx-3.v28.ch3.sourceforge.com ([172.29.28.193] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1eIyTj-0003iu-F3 for openvpn-devel@lists.sourceforge.net; Sun, 26 Nov 2017 15:04:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Fcju+vPj5f1W4raOAkbpOxh6a/0AB6I3a9+tPsWv4U8=; b=j48f1jfk7QCtUVb86MIloxEwOm OXoPH7Wjt/yO4GNe1lCLDU/d8c3KD44ucE/y6k1uHeagW53DWpMkrl1cENNPR/mDCe9bR3bShjnxo JfzjrrzVzh39EBk5VwJlAk+w4m+ip2cUxxcqaTBQtQ7THIzNiFQTdpHIPmlRXwVZnCTw=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version: Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Fcju+vPj5f1W4raOAkbpOxh6a/0AB6I3a9+tPsWv4U8=; b=BrN5pPbcIBOYUFLv5A+9SRmUD1 MfR19NZJgNfWUyuKOAA0mxjVLvK1qbOtOfdANnEhJK+J5FnEmrT28n1Tyl512wPmV38Xi1ryf9LAk tbSBdqiTQ3uMdbUsmsKIxzD77knDscvgJT+5OsnnMzFWB/ZR5P2K5tfdUTHlQ5fsNv/Q=; Received: from mail-wm0-f66.google.com ([74.125.82.66]) by sfi-mx-3.v28.ch3.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89) id 1eIyTf-0000z7-P9 for openvpn-devel@lists.sourceforge.net; Sun, 26 Nov 2017 15:04:19 +0000 Received: by mail-wm0-f66.google.com with SMTP id b189so30118548wmd.5 for ; Sun, 26 Nov 2017 07:04:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=karger-me.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=Fcju+vPj5f1W4raOAkbpOxh6a/0AB6I3a9+tPsWv4U8=; b=X3nnQp7Ro9DbTvm7OC6+tFzdos0sQUjVLYUwQy2X4nO+E1bCu1qExAp8EYo3JeObsl Q/U8q+5wUSdeEW1bHOycst8MzWGvmNHkJA4a9FZ2bQAI3WT2SIwtaOZWVp5I/d+CeKs1 oor7a+9FJvBlsluGSoE95XR7RF4KtpKu8eh6w2jakZQxAdh7PzYNG7dnATZ+iRkMdggf WNVcXJHqBUVXRsl2Tm4c1pJ2i9hDgOlSlobBeOqL6UWXYLO3dg5UCq2SDCUis7vxAPvQ AOzxjb/OXxHL3Zhnv1EgxsOyOAs5lRL4N/8mKk3+Khfv9KLbgkVmi4f3ATcjgQiWRUNV 7Bcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Fcju+vPj5f1W4raOAkbpOxh6a/0AB6I3a9+tPsWv4U8=; b=iTgHWO9947hqpXQLVaOIcsaVxIvX6zUATH1bZp7vgHMTEqCg3pi2FSYUjyEz1mNTql fUkfurQDdShAus59R3jLvBY79MygMfQaJCGsx9PUhJAO/VTqq7UGtw9emWrDZRiBzF8M BqJcezYvi3jhPL9RbXoY3Vk05aNrEteJp4HBvsIYbG0rzMr3DPguFL3CGyi/VP1uko8s xDgLUCYg3UzKN6RV7SbDoWXkyT1uYVBVXxuTAt1iFeogXPtMrh26va39SGVOd8+CB5g3 vnhvPk+x4nKEbwTRo97LZzRS5iXpWJXo91GN7Xs4mAJNTYCSiTt3J66SgAlwIPJvDhNg ob7Q== X-Gm-Message-State: AJaThX5SHoo4FbzNcU0lBeKtKdxNcN4XVVDYns0Eos8vvEyEibS40CGP Uc5890D3oWAViULKG1navlGOXp+3X1s= X-Google-Smtp-Source: AGs4zMYwKzs2ZzccTsj8Zinv5PBUw2WL7W7bog09qY3Hg0mUo3QvIJFFj4w/3NW+e87DJ7g1GrNdHg== X-Received: by 10.80.134.108 with SMTP id 41mr49002258edt.69.1511708649422; Sun, 26 Nov 2017 07:04:09 -0800 (PST) Received: from vesta.fritz.box ([2001:985:e54:1:d42a:81d4:ce94:db48]) by smtp.gmail.com with ESMTPSA id s14sm2520059eds.78.2017.11.26.07.04.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Nov 2017 07:04:08 -0800 (PST) From: Steffan Karger To: openvpn-devel@lists.sourceforge.net Date: Sun, 26 Nov 2017 16:04:00 +0100 Message-Id: <20171126150401.28565-1-steffan@karger.me> X-Mailer: git-send-email 2.14.1 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [74.125.82.66 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1eIyTf-0000z7-P9 Subject: [Openvpn-devel] [PATCH 1/2] openssl: don't use deprecated SSLEAY/SSLeay symbols X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox Compiling our current master against OpenSSL 1.1 with -DOPENSSL_API_COMPAT=0x10100000L screams bloody murder. This patch fixes the errors about the deprecated SSLEAY/SSLeay symbols and defines. Signed-off-by: Steffan Karger Acked-by: Gert Doering --- configure.ac | 1 + src/openvpn/openssl_compat.h | 8 ++++++++ src/openvpn/ssl_openssl.c | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index acfddb22..954c4516 100644 --- a/configure.ac +++ b/configure.ac @@ -925,6 +925,7 @@ if test "${enable_crypto}" = "yes" -a "${with_crypto_library}" = "openssl"; then EVP_MD_CTX_new \ EVP_MD_CTX_free \ EVP_MD_CTX_reset \ + OpenSSL_version \ SSL_CTX_get_default_passwd_cb \ SSL_CTX_get_default_passwd_cb_userdata \ SSL_CTX_set_security_level \ diff --git a/src/openvpn/openssl_compat.h b/src/openvpn/openssl_compat.h index c9b6a179..9eb427da 100644 --- a/src/openvpn/openssl_compat.h +++ b/src/openvpn/openssl_compat.h @@ -643,6 +643,14 @@ EC_GROUP_order_bits(const EC_GROUP *group) #endif /* SSLeay symbols have been renamed in OpenSSL 1.1 */ +#ifndef OPENSSL_VERSION +#define OPENSSL_VERSION SSLEAY_VERSION +#endif + +#ifndef HAVE_OPENSSL_VERSION +#define OpenSSL_version SSLeay_version +#endif + #if !defined(RSA_F_RSA_OSSL_PRIVATE_ENCRYPT) #define RSA_F_RSA_OSSL_PRIVATE_ENCRYPT RSA_F_RSA_EAY_PRIVATE_ENCRYPT #endif diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c index 10d161ef..18ceecb4 100644 --- a/src/openvpn/ssl_openssl.c +++ b/src/openvpn/ssl_openssl.c @@ -1884,7 +1884,7 @@ get_highest_preference_tls_cipher(char *buf, int size) const char * get_ssl_library_version(void) { - return SSLeay_version(SSLEAY_VERSION); + return OpenSSL_version(OPENSSL_VERSION); } #endif /* defined(ENABLE_CRYPTO) && defined(ENABLE_CRYPTO_OPENSSL) */