Re: [PATCH] test/gpgsm: use --with-colons when calculating fingerprint.

Subject: Re: [PATCH] test/gpgsm: use --with-colons when calculating fingerprint.

Date: Wed, 12 Jan 2022 17:39:32 +0100

To: notmuch@notmuchmail.org

Cc:

From: Stig Palmquist


On 2022-01-12 17:38, Stig Palmquist wrote:
> LGTM, tests work with GnuPG 2.3
> 
> Nice use of awk btw.
> 
> Stig.
> 
> On 2022-01-11 19:52, David Bremner wrote:
> > 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
> > 
> 

-- 
Stig Palmquist <stig@stig.io>
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: