With the attached (the first test from T355-smime.sh) saved as foo.sh,
try running the following.

count=0; while ./foo.sh ; do
count=$((count + 1))
echo $count >> tests.log
done

After the somewhere between 1 and 200 iterations this hangs up for
me. Emacs is still running, the message-mode buffer has appropriate
looking stuff in it. There is nothing interesting in *Messages*, and the
buffer is still titled "*unsent mail*". When sending manually, I get
a message that there is no key for test_su...@notmuchmail.org

After digging through mml-secure for a while, I realized that the
problem is not actually in emacs, but in our test harness for gpgsm. I
added the gpgsm -K to the script, and you can see that the
test_su...@notmuchmail.org key is not being added.

I think that means there is some kind of intermittent failure with the
following pipeline
    
    openssl pkcs12 -export -passout pass: -inkey 
"$NOTMUCH_SRCDIR/test/smime/key+cert.pem" \
        < "$NOTMUCH_SRCDIR/test/smime/test.crt" | \
        gpgsm --batch --no-tty --no-common-certs-import 
--pinentry-mode=loopback --passphrase-fd 3 \
              --disable-dirmngr --import  >"$GNUPGHOME"/import.log 2>&1 3<<<''

I've attached "import.log". I _think_ the failure reported is the
notmuchmail.org key, and the success is the 'Bob Babbage' key, 

#!/usr/bin/env bash

test_description='S/MIME signature verification and decryption'
. $(dirname "$0")/test-lib.sh || exit 1

test_require_external_prereq openssl
test_require_external_prereq gpgsm

FINGERPRINT=$(openssl x509 -sha1 -fingerprint -in "$NOTMUCH_SRCDIR/test/smime/key+cert.pem" -noout | sed -e 's/^.*=//' -e s/://g)

add_gpgsm_home

gpgsm -K

test_begin_subtest "emacs delivery of S/MIME signed message"
test_expect_success \
     'emacs_fcc_message \
     "test signed message 001" \
     "This is a test signed message." \
     "(let ((mml-secure-fail-when-key-problem t)) (mml-secure-message-sign \"smime\"))"'
test_done

Attachment: import.log
Description: Binary data

_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org

Reply via email to