From patchwork Wed Jun 16 20:12:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lev Stipakov X-Patchwork-Id: 1863 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director11.mail.ord1d.rsapps.net ([172.27.255.55]) by backend30.mail.ord1d.rsapps.net with LMTP id jeuPGRLoymA+PQAAIUCqbw (envelope-from ) for ; Thu, 17 Jun 2021 02:13:38 -0400 Received: from proxy11.mail.iad3a.rsapps.net ([172.27.255.55]) by director11.mail.ord1d.rsapps.net with LMTP id 2NX8GBLoymDDTwAAvGGmqA (envelope-from ) for ; Thu, 17 Jun 2021 02:13:38 -0400 Received: from smtp37.gate.iad3a ([172.27.255.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy11.mail.iad3a.rsapps.net with LMTPS id +AsrEhLoymAjVAAAxCvdqw (envelope-from ) for ; Thu, 17 Jun 2021 02:13:38 -0400 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.105.38.7] Authentication-Results: smtp37.gate.iad3a.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; 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=gmail.com; dmarc=fail (p=none; dis=none) header.from=gmail.com X-Suspicious-Flag: YES X-Classification-ID: 274b3612-cf33-11eb-9468-525400dc5f6a-1-1 Received: from [216.105.38.7] ([216.105.38.7:55484] helo=lists.sourceforge.net) by smtp37.gate.iad3a.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 81/C0-20672-118EAC06; Thu, 17 Jun 2021 02:13:38 -0400 Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1ltlGm-00071C-8e; Thu, 17 Jun 2021 06:12:52 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ltlGk-00070t-F4 for openvpn-devel@lists.sourceforge.net; Thu, 17 Jun 2021 06:12:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=References:In-Reply-To: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:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=67wdt2vUm+BL85GYxkiXCehAq5pic4k7zo5W0joVvsw=; b=V+YQiSn/ea8jzPmwfqX10VYzkW hWIE1qLtS+JLDVTGotgHQuoW2XBA/i9TsmHalGaznLEdmhpjqall+t9fmmDbnP8L+xqPD5K5Q6ul8 HE+p2aflQ84XGjvptwkpap8qjR1zACFSHqqknOCxfNB01YnMZl+YovfKokHUDzSNDUAU=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=References:In-Reply-To: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:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=67wdt2vUm+BL85GYxkiXCehAq5pic4k7zo5W0joVvsw=; b=Sc2954bgoiMqlhATiVn+EAwFf9 q3ykL9663fgaBdPw8YoZ3dYLi0D07I3uwkD7cyeCVxcvyqSJF1yBQj/Cv1wR/Z/l65B+NiSwpqOa0 wTT8rMGAXrrouj/LXPWTpe6ycTjKqJs58tZyN1OqAMhng327nOOOBHVn8To6b06OzNlE=; Received: from mail-ej1-f50.google.com ([209.85.218.50]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.3) id 1ltlGe-000478-3e for openvpn-devel@lists.sourceforge.net; Thu, 17 Jun 2021 06:12:50 +0000 Received: by mail-ej1-f50.google.com with SMTP id nb6so7726597ejc.10 for ; Wed, 16 Jun 2021 23:12:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=67wdt2vUm+BL85GYxkiXCehAq5pic4k7zo5W0joVvsw=; b=Owq+HH4dwDg9CYw4EpGz2Sl5eJtbcC9dZogC/CCwjiuEH/eGrUuph2JN7ZNkG/nWEt B4GjNYD54wpMt5sKWPDDGZY/YHrFfRj1UHQfJ5GgfzhMicD3bDJVMmQnVg/V9OcZeIfp 5EMyhfjtp437+GM6fx1td0RXI2TiY7i+RaZqDisTS/o/zvx9mov6+UF6sYXca+wWdZGM XoNOqsz62nbPwFN2CAhZsGaTC1H7O1xIItSiFEdjARfpofi66r7pH60BxODTgf12Rh4p NhEKPK/0+CbCu3PZ29j//1OFMTqDKl04Mttpgy7FXTglKvQyS0mbMuDPhf7qGUSkT5Oz IZXQ== 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:in-reply-to :references; bh=67wdt2vUm+BL85GYxkiXCehAq5pic4k7zo5W0joVvsw=; b=JLKXm77CWB67egQaQVlAbUdEZHtdMI05KE2fWHjtDw5nmV3BCkbPhnHYqWoTOhTcLF j8X7hdQ2zMQr2qQpvs0EjoUVtsnvg+6puOyISYVGk904pTrvCKAiwqqayygF8YxWKb/F jfSrxeOD3Uygrz0+stq9klqQFTKVDsKsA1Eb6bte5UKovTaIHVRmcIZZXVUBMoK5+K+S DnDa/Yay48sXVvaaUyepQ8dz+bO/hIZcK4DKi+wbF+3RKVLwGSWjnxZU+vC/6EVInYFu b/QJt+TAQVBW9p+1Le1YVRmokXHYVcDLu5Fcpobx1+81aSRRx09tsQd7BNrS/nJhrKJ7 2mWw== X-Gm-Message-State: AOAM530L3IjlxFEFi5GuyqtuE00l7vT4CoRXNoti84GiOZuh9TlpgX2G L6sWJBybfnjO6F4aVwlLNzNXhxs1Usuoi1iH X-Google-Smtp-Source: ABdhPJwsZh2MVuaDn4FCUPerVj5f08ISJU2KL0SvvS8fwnPIa1KtvBkyFoh6H715xj5IH6GxejBZYQ== X-Received: by 2002:a17:906:a0a:: with SMTP id w10mr3462073ejf.416.1623910358831; Wed, 16 Jun 2021 23:12:38 -0700 (PDT) Received: from LAPTOP-4L3N7KFS.localdomain (nat3.panoulu.net. [185.38.2.3]) by smtp.gmail.com with ESMTPSA id kf3sm3194800ejc.8.2021.06.16.23.12.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Jun 2021 23:12:38 -0700 (PDT) From: Lev Stipakov To: openvpn-devel@lists.sourceforge.net Date: Thu, 17 Jun 2021 09:12:26 +0300 Message-Id: <20210617061226.244-1-lstipakov@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210617061027.140-1-lstipakov@gmail.com> References: <20210617061027.140-1-lstipakov@gmail.com> X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: openvpn.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (lstipakov[at]gmail.com) 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.218.50 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.218.50 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Headers-End: 1ltlGe-000478-3e Subject: [Openvpn-devel] [PATCH 1/2] crypto_openssl.c: disable explicit initialization on Windows 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: , Cc: Lev Stipakov MIME-Version: 1.0 Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox From: Lev Stipakov Commit a4071b ("crypto_openssl: add initialization to pick up local configuration") added openssl initialization to load configuration file. However on Windows this file is loaded from user-writable directory, such as c.\etc\ssl for mingw builds and (for example) c:\vcpkg\packages\openssl_x64-windows\openvpn.cnf for vcpkg builds. This could be a security risk. Since aforementioned commit implements a niche feature which anyway should use CryptoAPI on Windows, make this code conditional. Signed-off-by: Lev Stipakov Acked-by: Gert Doering Signed-off-by: Lev Stipakov <lev@openvpn.net>
--- src/openvpn/crypto_openssl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/openvpn/crypto_openssl.c b/src/openvpn/crypto_openssl.c index c571030b..603c67b0 100644 --- a/src/openvpn/crypto_openssl.c +++ b/src/openvpn/crypto_openssl.c @@ -154,11 +154,13 @@ crypto_init_lib_engine(const char *engine_name) void crypto_init_lib(void) { +#ifndef _WIN32 #if (OPENSSL_VERSION_NUMBER >= 0x10100000L) OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL); #else OPENSSL_config(NULL); #endif +#endif /* _WIN32 */ /* * If you build the OpenSSL library and OpenVPN with * CRYPTO_MDEBUG, you will get a listing of OpenSSL