From patchwork Wed May 8 03:52:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steffan Karger X-Patchwork-Id: 728 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director8.mail.ord1d.rsapps.net ([172.27.255.51]) by backend30.mail.ord1d.rsapps.net with LMTP id SOQlCHHf0lw2HgAAIUCqbw for ; Wed, 08 May 2019 09:53:53 -0400 Received: from proxy6.mail.iad3a.rsapps.net ([172.27.255.51]) by director8.mail.ord1d.rsapps.net with LMTP id KINPBXHf0lxtJAAAfY0hYg ; Wed, 08 May 2019 09:53:53 -0400 Received: from smtp20.gate.iad3a ([172.27.255.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy6.mail.iad3a.rsapps.net with LMTP id gGy6OnDf0lwGVgAA8udqhg ; Wed, 08 May 2019 09:53:52 -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: smtp20.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=foxcrypto.com; dmarc=fail (p=none; dis=none) header.from=foxcrypto.com X-Suspicious-Flag: YES X-Classification-ID: b60352b8-7198-11e9-b4c7-525400aab2f3-1-1 Received: from [216.105.38.7] ([216.105.38.7:52185] helo=lists.sourceforge.net) by smtp20.gate.iad3a.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id F0/AF-21090-07FD2DC5; Wed, 08 May 2019 09:53:52 -0400 Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1hON0G-0007yB-1d; Wed, 08 May 2019 13:53:00 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1hON0E-0007y4-Ub for openvpn-devel@lists.sourceforge.net; Wed, 08 May 2019 13:52:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:MIME-Version:References:In-Reply-To: Date:Subject:CC:To:From:Sender:Reply-To:Message-ID: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=lwA8obilL/inqq5+M2qc6TJs0GYLemymBBfPTN5pq8k=; b=ghHbUcR5Vub7/fNNwCFWy8tJZm gMIK5txsVB5Jk1X7S0We20mPEaK4Oh69htcVtfYbTEq3FtffyaKUPcnomgTvfprsljgjF9HF56Auk GyLJ3+j2b8Jmz3RykSN79MPF9SeLMhr5iiAbEif3Zx63FiqzpyKmqeI2ES4Wye4fzlco=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:MIME-Version:References:In-Reply-To:Date:Subject:CC:To:From: Sender:Reply-To:Message-ID: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=lwA8obilL/inqq5+M2qc6TJs0GYLemymBBfPTN5pq8k=; b=hcK5DEy1+X0Hc593bH9k5OBY/w GPRJ4XHuKDy+3tJwBT8noavgKWMMPssF48CCrkNNqQqyf8iJOvo//rkAq9AZVUrBSQ2DUE3LuP03E oAs5C0DLHlxOgvwrc8qQigF56CSWz8Owqta3P3YCWNxrn6kzz1p6BRH7X9+fVP1FJK90=; Received: from nl-dft-mx-01.fox-it.com ([178.250.144.135]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) id 1hON0D-009ulS-0v for openvpn-devel@lists.sourceforge.net; Wed, 08 May 2019 13:52:58 +0000 From: Steffan Karger To: Date: Wed, 8 May 2019 15:52:20 +0200 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190507112039.GC31008@greenie.muc.de> References: <20190507112039.GC31008@greenie.muc.de> MIME-Version: 1.0 X-ClientProxiedBy: FOXDFT52.FOX.local (10.0.0.129) To FOXDFT52.FOX.local (10.0.0.129) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; d=foxcrypto.com; s=NL-DFT-MX-01; c=relaxed/relaxed; h=from:to:cc:subject:date:references:mime-version:content-type; bh=lwA8obilL/inqq5+M2qc6TJs0GYLemymBBfPTN5pq8k=; b=SIBfqjz98qPyWEZlHIjfw1xlH1XP7likw52XwYw4gs08tfEo6ePTb4KWhPyfPQg3WldojJJXcLhX 2LJYKsi/qKrS+q9MXwIfzHCDCLOMo7RP+bVvDr/X2O8/5r5bZxcUMPTHe7ZdJ+B5Fxme/znLCswq oTPgRxwRTGoW2cGhq7rjabi0rLmEP/n1VQCOqPBbcVZK3M9dRRwGJMk9JUZYm6oRPGpvamC/OMAb 5z1r2T5V1LbagtUmUYkirRd/CiTqvnYU7u8avhAWlJPvOiSjbgsADesBSU8nLzWrvJm/o6eoU5pS Xl5NtFrsD7KNqVCPj2ldRcMnqPRsJfOfL409zQ== 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: t_lpback.sh] -0.0 SPF_PASS SPF: sender matches 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 1.0 MISSING_MID Missing Message-Id: header X-Headers-End: 1hON0D-009ulS-0v Subject: [Openvpn-devel] [PATCH v2] tests: remove dependency on base64 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: Steffan Karger Errors-To: openvpn-devel-bounces@lists.sourceforge.net Message-Id: X-getmail-retrieved-from-mailbox: Inbox From: Steffan Karger Triggered by the report from Ilya, that if base64 is missing, the tests would still report success: Testing tls-crypt-v2 key generation (max length metadata)..../t_lpback.sh: base64: not found OK PASS: t_lpback.sh The easiest way to fix that, is to remove the dependency on base64 (which is it's current form wouldn't work on OSX anyway, because their base64 doesn't understand "-w0"). Signed-off-by: Steffan Karger --- v2: build loop using 'expr' instead of 'seq', which should also work on OpenBSD. tests/t_lpback.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/t_lpback.sh b/tests/t_lpback.sh index fb43211d..3b1e73a8 100755 --- a/tests/t_lpback.sh +++ b/tests/t_lpback.sh @@ -77,10 +77,17 @@ else echo "OK" fi +# Generate max-length base64 metadata ('A' is 0b000000 in base64) +METADATA="" +i=0 +while [ $i -lt 732 ]; do + METADATA="${METADATA}A" + i=$(expr $i + 1) +done echo -n "Testing tls-crypt-v2 key generation (max length metadata)..." "${top_builddir}/src/openvpn/openvpn" --tls-crypt-v2 tc-server-key.$$ \ - --tls-crypt-v2-genkey client tc-client-key.$$ \ - $(head -c732 /dev/zero | base64 -w0) >log.$$ 2>&1 + --tls-crypt-v2-genkey client tc-client-key.$$ "${METADATA}" \ + >log.$$ 2>&1 if [ $? != 0 ] ; then echo "FAILED" cat log.$$