From patchwork Mon Jan 22 13:09:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 3586 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7301:2802:b0:101:b91e:57cc with SMTP id hj2csp2562850dyb; Mon, 22 Jan 2024 05:09:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IENPIc5Y8/XvLSPdWanblLH/32VNrCphYRIW07nhwyMzFZCfMR/qqmz9ymS022yFFFE+4ZY X-Received: by 2002:a05:6a21:398f:b0:19b:20e9:90da with SMTP id ad15-20020a056a21398f00b0019b20e990damr12625200pzc.5.1705928979348; Mon, 22 Jan 2024 05:09:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705928979; cv=none; d=google.com; s=arc-20160816; b=vSSNWcHaY/T0PFLtr8CqodUwShIIHk2sCNp5sFCBQmvLY6MJGMuqJvB6394ZIsqzcF 2qGiAhN3Cv2cT7qMM4yxg+CEsRgSF8Hkrpo6z4MlCvC3IGm3LFwIavqC3Jbhd31zpVOL /uPL2621OvTGab7eQ30jai+FGDtm1gRx3LLWC0Qtwi5dwLm0qadlDJynwCH+OS3wHzyU gxFxMRIirvpSoRV+ibOgtv9z1IkgPABLFxh6pEQKK8tAnE+XJY1MwXyUVrK3aIjC8p4+ wEt0hBC0pFSYPLzC84D0R8DgxLRKmhgBzR1Sm7vL9SAz3UjQhe+T1+Udd3rFgSr4D41K XhrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature; bh=olNQ63XnK1gvuQpxz9mlpoLqrK4NK2tVe6mWZBwb1p4=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=zXKtk4KHKUNXXObKtKo0neknTsfBj56tQTX63mcOZDWLBOUNBO31LRIyvHxwD8rRw9 k8GCRmAXhHlWvIJYu4HJEsPQReonaltjBf4fl/9lMT6tAXBRR24BCbQNXDIDSTLHr7vA al3gJs/ArPM2BS7gzyDvRaTMIZzfQ5fXHTjYYj/lld1kdg2aso4jz1CPn+AzdI86U7V6 4jFZLW5E2NJrOhs2XWVoY9TrzT0J+1gRXUHUG8RBRRPMHRRZHugGtTP4gXT7dqjZb/W/ VY+/IFeF/bwJWbKRDTjw5uM2LyrofNI+fchj+rfUOGYNwWBznMo6MDOrPOZnF9gPO0bQ Wapw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=SrsDF2LM; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=Oi15P3id; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id d22-20020a631d56000000b005ce087e0049si8110064pgm.696.2024.01.22.05.09.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jan 2024 05:09:39 -0800 (PST) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=SrsDF2LM; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=Oi15P3id; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1rRu3F-0002BO-1H; Mon, 22 Jan 2024 13:09:21 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rRu3D-0002BI-5O for openvpn-devel@lists.sourceforge.net; Mon, 22 Jan 2024 13:09:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=qXHOoIZZBQF6Q8RL50xpeSsZka0B9VSu4hvoOGXEV3A=; b=SrsDF2LM+NL5CAL7yvwvjdGjza jwOXd+mRC8Cpcd5SPyZPZYViE+RxHHUrDvvheA2khzSv93CYXOzPGNAWWih4zOgDYw/tMa4CAjRzD Gzg4LD2aT2kV7/Z0l53TBijnFpdFQng9wgS1RHX4cUKeHFqwIKi91dl/He/hJnoad7oU=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=qXHOoIZZBQF6Q8RL50xpeSsZka0B9VSu4hvoOGXEV3A=; b=Oi15P3idXJi3U+9qa748t5aDHO OKu106jMN84YGBbcmzqQPMeGWrgtqlMStB8LeTfY9AmXCGq5wH28sekFTTFcbmboYk5TxIrQN2H1g eBg31BRGdH2P9ViKZ2DeLNPfptEESiHtVdZXN4bEMlnj9v3q5mWrqiRXhI8DL+LKirTw=; Received: from dhcp-174.greenie.muc.de ([193.149.48.174] helo=blue.greenie.muc.de) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1rRu3B-000316-KG for openvpn-devel@lists.sourceforge.net; Mon, 22 Jan 2024 13:09:19 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.17.1.9/8.17.1.9) with ESMTP id 40MD9BHv010718 for ; Mon, 22 Jan 2024 14:09:11 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.17.1.9/8.17.1.9/Submit) id 40MD9BL0010717 for openvpn-devel@lists.sourceforge.net; Mon, 22 Jan 2024 14:09:11 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Mon, 22 Jan 2024 14:09:09 +0100 Message-ID: <20240122130909.10706-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: -0.0 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-2.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Arne Schwabe OpenSSL 1.1.1 will initialise itself using clever linker magic. For OpenSSL 1.0.2 we need to manually initialise the library. For other unit tests just doing the OpenSSL_add_all_algorithms is enough b [...] Content analysis details: (-0.0 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Headers-End: 1rRu3B-000316-KG Subject: [Openvpn-devel] [PATCH v1] Fix ssl unit tests on OpenSSL 1.0.2 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: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1788796185095595783?= X-GMAIL-MSGID: =?utf-8?q?1788796185095595783?= From: Arne Schwabe OpenSSL 1.1.1 will initialise itself using clever linker magic. For OpenSSL 1.0.2 we need to manually initialise the library. For other unit tests just doing the OpenSSL_add_all_algorithms is enough but this unit test needs a more complete initialisation. Change-Id: I378081f391ad755d0a6fd5613de5c2a8bacc389a Acked-by: Frank Lichtenheld --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/503 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Frank Lichtenheld diff --git a/tests/unit_tests/openvpn/test_ssl.c b/tests/unit_tests/openvpn/test_ssl.c index fd2049f..d0c3df7 100644 --- a/tests/unit_tests/openvpn/test_ssl.c +++ b/tests/unit_tests/openvpn/test_ssl.c @@ -127,13 +127,13 @@ }; #if defined(ENABLE_CRYPTO_OPENSSL) - OpenSSL_add_all_algorithms(); + tls_init_lib(); #endif int ret = cmocka_run_group_tests_name("crypto tests", tests, NULL, NULL); #if defined(ENABLE_CRYPTO_OPENSSL) - EVP_cleanup(); + tls_free_lib(); #endif return ret;