From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id EM7tAUwY3mHSGAEAgWs5BA (envelope-from ) for ; Wed, 12 Jan 2022 00:52:44 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id eJhANksY3mHJ+gAAG6o9tA (envelope-from ) for ; Wed, 12 Jan 2022 00:52:43 +0100 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A0B152D85E for ; Wed, 12 Jan 2022 00:52:43 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 0BFF95F74E; Tue, 11 Jan 2022 23:52:39 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id EA5BC5F747 for ; Tue, 11 Jan 2022 23:52:35 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id E47445FC51; Tue, 11 Jan 2022 18:52:34 -0500 (EST) Received: (nullmailer pid 521047 invoked by uid 1000); Tue, 11 Jan 2022 23:52:33 -0000 From: David Bremner To: Stig Palmquist , notmuch@notmuchmail.org Subject: [PATCH] test/gpgsm: use --with-colons when calculating fingerprint. Date: Tue, 11 Jan 2022 19:52:30 -0400 Message-Id: <20220111235230.521033-1-david@tethera.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <87o84iza9r.fsf@starbuck.i-did-not-set--mail-host-address--so-tickle-me> References: <87o84iza9r.fsf@starbuck.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Message-ID-Hash: BRAMJGGRRASFE7BH77OENIB6WOWTCIIW X-Message-ID-Hash: BRAMJGGRRASFE7BH77OENIB6WOWTCIIW X-MailFrom: bremner@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1641945163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=HBlZH2PcGaMiloz3RWbNWXXP4Vc5QjCoha/dcF0vfrg=; b=ZWbY8row38aIlM5axJqi7gd8rNq0HPRRLOYVM2F9ketJexgdDHuYIFT2/UJmcQKYaUx0uO EkT1sQ7hkuP9HVGJ4OMZkHR9waIcZYWfHJHe5HFxy5wxaRz3V/0j2uVmBUs5bqK6ZIU2EK 3iJdwMuFCr70bSGj85pdZHwIN8uMiSrKZVCF5ViiTRNTNlyfWcIKDDAX+O13WyVfE1VzG8 CPZzfRZb5YLeMyIchots6LePA36ZUm3Alc9zAEYeqX/eca7XL+VXNGkMKJMRrSXpsRwGCS qFBdvobPScaXW/PBBVLFX8EcVwgUINrm7BKTxGDI2GzgzHec+UCneW2++kMvnQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641945163; a=rsa-sha256; cv=none; b=qC1B1QXpNEO3inQUd3tCOQxKr/LURA7jE9w7MFajR6m+xliAL17UCBC+Gv30Qgb01f4OIK i5dHk1YASV2f0pYyBa1+0eNySGakVuWiohKUX4NsWFOOpEpL3sv+ubwzpCqX23VVKeqFyH p0uVkmc1G65Dx16J1WVf2LChbTR73a8WRN1UD1ODrdAZhh58nPEu7ynQUBw/qUsCYKbKSb /xxQXXHzKmeGqQD9VHY41mEgIRAirwQjnQyTOwHgHV95OW//JC98yt/THZAN4WcwLQVnQj ArbT8lQA1bjgeD2SnDOYgvIn18NmIN7o0viZo7EonOlU6Yj3mfWvhjyE3vkysw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.80 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: A0B152D85E X-Spam-Score: -1.80 X-Migadu-Scanner: scn0.migadu.com X-TUID: z/+o+hz8vtrJ As stressed by the gpg documentation, the non-'with-colons' output format is subject to change, and indeed it did in 2.3.x (x<=3). This should make the the test suite more robust against such changes. --- test/test-lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 6bc0b723..f1275b85 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -145,7 +145,7 @@ add_gpgsm_home () { mkdir -p -m 0700 "$GNUPGHOME" gpgsm --batch --no-tty --no-common-certs-import --pinentry-mode=loopback --passphrase-fd 3 \ --disable-dirmngr --import >"$GNUPGHOME"/import.log 2>&1 3<<<'' <$NOTMUCH_SRCDIR/test/smime/0xE0972A47.p12 - fpr=$(gpgsm --batch --list-key test_suite@notmuchmail.org | sed -n 's/.*fingerprint: //p') + fpr=$(gpgsm --batch --with-colons --list-key test_suite@notmuchmail.org | awk -F: '/^fpr/ {print $10}') echo "$fpr S relax" >> "$GNUPGHOME/trustlist.txt" gpgsm --quiet --batch --no-tty --no-common-certs-import --disable-dirmngr --import < $NOTMUCH_SRCDIR/test/smime/ca.crt echo "4D:E0:FF:63:C0:E9:EC:01:29:11:C8:7A:EE:DA:3A:9A:7F:6E:C1:0D S" >> "$GNUPGHOME/trustlist.txt" -- 2.34.1