From patchwork Sun Oct 18 13:08:26 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 5485 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:848c:b0:8dc:5c83:a4ec with SMTP id z12csp363529max; Sun, 18 Oct 2026 06:08:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AKwUvByCWTlREyOZRulSILCn4CaymyH0r+rtQWaQNgPaE36a+Xwf6+OsKXFdRqNVAUprhjxZYa7vToQHpYI=@openvpn.net X-Received: by 2002:a05:6808:c40a:b0:4b9:e65b:8c2c with SMTP id 5614622812f47-53ccca43222mr3584660b6e.26.1792328934945; Sun, 18 Oct 2026 06:08:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1792328934; cv=none; d=google.com; s=arc-20260327; b=F8V7kZR39eVrEUHxR3ChYZo8VcputTt8u2fC556Ngzy0ahFBdHy49GiUICAE625gdP pCnfQDWt7bT1ca3MCMfCfzvea2kppvKg8B3+SUgud17kdAiIv4iLMRR63Vx0f3IQmSbB 5vwr7U7zQ1xw+azoIdHZW+BEDAE1rZPhwCCsKgN3yeN67Kfs+p5Xqve7mWhaSwgkUC8w PTm3ryf1klGon+auwQdVbx+1XRUq1m1t9JFoOjI/fHg0PKvokjp4jp2pEAr56KSOe2SX 06wWxIXcY5FIlKDzB1mJAH1DitV0Fftc2MyS/N1LnjjHQIRwfJXk/EG0g5Ye14ZNlozW W8nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; 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:dkim-signature; bh=ZF1T+pJqXwe1qUE0levfStnXCoIDDTtEBHny23t5pfA=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=rwPi6glIirfh81sLXxzXaV+Uj3Qx9tXpjSFL52HPoV/tkvh8Fe71bvDuJ3LWy/gRUQ GqnKs0+0Xhc5wFGabE46xLNiBGqh1TyVRXzfWV8kTPSJJuD/hq2X+GF0Ln+y4eFElI6d 1p9NUd7Cie5mfN+NF1Mm+HygbESvyB1qXLozOcbsoL0EWePyM1aclr+eVwkh6Dwc/rYX EytAwQJ078M01qQUFSQVGYWseTKzoouRXVnRbL/r8VxnWHP81rf0a6k/iwpSBrT6LEui q+SrxO9KYT7azVzFqjX+h9Qme60OK0NKLh05ljxs7Ol+PgOE4is9t/pchB/Po2IcT2xF XD+A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=jfWKGnxT; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Ag3BD0j4; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=j51rY7Ds; 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 586e51a60fabf-4a73b7355c5si10361275fac.206.2026.10.18.06.08.54 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Oct 2026 06:08:54 -0700 (PDT) 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=pass header.i=@lists.sourceforge.net header.s=beta header.b=jfWKGnxT; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Ag3BD0j4; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=j51rY7Ds; 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 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:MIME-Version:References:In-Reply-To:Message-ID:Date:To:From:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZF1T+pJqXwe1qUE0levfStnXCoIDDTtEBHny23t5pfA=; b=jfWKGnxTrilXkW43t002IMowpK PDNy+hyKfV0WlAMrsUYEuhQC5IpWJiaXLp83fQQlUHCbUAGD8rV25ZZ7BSyaTQlNFt29Tx5AEc1Lt TBKFGbO5/r9SoMCrT1rvKkLyNAFgOUWBnglrDOSzoJMdH/4JxyO8mEJsPiDSPb2imYaY=; 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 1xIQd1-0000R3-RC; Sun, 18 Oct 2026 13:08:44 +0000 Received: from [172.30.29.66] (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 1xIQd0-0000Qv-0o for openvpn-devel@lists.sourceforge.net; Sun, 18 Oct 2026 13:08:42 +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=KWK0tYnvc3CfLXGBycTKjTZJ3MySrx/KQXcJDUvPiMw=; b=Ag3BD0j4wHEMoAgkTkMbUAT6nk YU3sdlfa7Vb1Xzgy6lT6ezeqHFX3V4uA9AttcUUYGrRVLPb0a9YLt7w+DDwgf6x2oGXr7X59uTNg6 dSB1cLJeZ3z1fF2fPRmqHliZZ6x8UjjGdyq1NSF4L59jLCjrvZtvduhhY4U3EPrhnZWw=; 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=KWK0tYnvc3CfLXGBycTKjTZJ3MySrx/KQXcJDUvPiMw=; b=j51rY7DskF325Hmf/Y76ymjDSG lKUdWzKyz3SKo9ANdK4cVQLdPvpvto2bQ6Ar4EzWd90FnHHevVFivcHDlfRgZC74zXMCFPKNDZPQ1 JaveqoByOBXgCo0FUrm7ldEhrNDpHvwfjH4IMycyAKlE4CZIGENdne6SDuQ7lNazJh+4=; Received: from [193.149.48.129] (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 1xIQcz-0006eB-Jq for openvpn-devel@lists.sourceforge.net; Sun, 18 Oct 2026 13:08:42 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.18.1/8.18.1) with ESMTP id 69ID8YmV011966 for ; Sun, 18 Oct 2026 15:08:34 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 69ID8YsB011965 for openvpn-devel@lists.sourceforge.net; Sun, 18 Oct 2026 15:08:34 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Sun, 18 Oct 2026 15:08:26 +0200 Message-ID: <20261018130834.11953-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.55.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "sfi-spamd-2.hosts.colo.sdot.me", 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: Steffan Karger Instead of forcing openssl to create consecutive serial numbers, let it generate random serials. Although not really relevant for the sample keys, that is the best practice. Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1xIQcz-0006eB-Jq Subject: [Openvpn-devel] [PATCH v1] gen-sample-keys.sh: use a random serial 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: 1879393105395391304 X-GMAIL-MSGID: 1879393105395391304 From: Steffan Karger Instead of forcing openssl to create consecutive serial numbers, let it generate random serials. Although not really relevant for the sample keys, that is the best practice. Signed-off-by: Steffan Karger Acked-by: Razvan Cojocaru Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2010 Change-Id: Ic36123c5a4a2b2295ffdf47174e2aceb9d17d668 --- 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/+/2010 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Razvan Cojocaru diff --git a/sample/sample-keys/gen-sample-keys.sh b/sample/sample-keys/gen-sample-keys.sh index e5a11f5..e914fd2 100755 --- a/sample/sample-keys/gen-sample-keys.sh +++ b/sample/sample-keys/gen-sample-keys.sh @@ -22,7 +22,6 @@ mkdir -p sample-ca rm -f sample-ca/index.txt touch sample-ca/index.txt -echo "01" > sample-ca/serial # Generate CA key and cert openssl req -new -newkey rsa:4096 -days 3650 -nodes -x509 \ diff --git a/sample/sample-keys/openssl.cnf b/sample/sample-keys/openssl.cnf index 02bf8ac..dcaebb7 100644 --- a/sample/sample-keys/openssl.cnf +++ b/sample/sample-keys/openssl.cnf @@ -14,7 +14,7 @@ new_certs_dir = $dir # default place for new certs. certificate = $dir/ca.crt # The CA certificate -serial = $dir/serial # The current serial number +rand_serial = yes # Use random serial numbers crl = $dir/crl.pem # The current CRL private_key = $dir/ca.key # The private key RANDFILE = $dir/.rand # private random number file