Using LAMPS sample certs, gpgsm 2.2.19 doesn't appear to calculate the expected validity of the "user IDs" (in X.509, this appears to mean the Subject DN and the subjectAltName X.509v3 extension).
Here's me marking the sample CA as trusted, importing both certs, and inspecting the validity:
0 $ mkdir -m 0700 testdir 0 $ cafpr=4D:E0:FF:63:C0:E9:EC:01:29:11:C8:7A:EE:DA:3A:9A:7F:6E:C1:0D 0 $ echo "$cafpr" S relax > testdir/trustlist.txt 0 $ export GNUPGHOME=$(pwd)/testdir 0 $ cat ca.crt alice.pem | gpgsm --import gpgsm: keybox '/home/dkg/testdir/pubring.kbx' created gpgsm: total number processed: 2 gpgsm: imported: 2 0 $ gpgsm --with-colons --list-keys /home/dkg/testdir/pubring.kbx ------------------------------------------------------ crt:u:2048:1:EEDA3A9A7F6EC10D:20191120T065418:20520927T065418:2D770D5C62366D9A77F2C57B705E957107E7283C::CN=Sample LAMPS Certificate Authority::cC::::::23: fpr:::::::::4DE0FF63C0E9EC012911C87AEEDA3A9A7F6EC10D:::4DE0FF63C0E9EC012911C87AEEDA3A9A7F6EC10D: grp:::::::::7289595444406308E7C700F983039B4D38D4491A: uid:u::::::::CN=Sample LAMPS Certificate Authority:: crt::2048:1:5FFC8A7DE2057DEB:20191120T065418:20520927T065418:6782B45973524BC1F47147196AF0FD118AAA4C0B::CN=Sample LAMPS Certificate Authority::esES::::::23: fpr:::::::::702BA4B157F1E2B7D16B0C6A5FFC8A7DE2057DEB:::4DE0FF63C0E9EC012911C87AEEDA3A9A7F6EC10D: grp:::::::::254CF0EDE5036291BB28C72AF096312BC45B120F: uid:::::::::CN=Alice Lovelace:: uid:::::::::<alice@smime.example>:: 0 $
DETAILS says of field 2:
For X.509 certificates a 'u' is used for a trusted root certificate (i.e. for the trust anchor) and an 'f' for all other valid certificates.
So i expect f in field 2 for the crt and uid lines in the second group of output lines, but instead i see the empty string.
To double-check, i confirmed that the certificate should be valid using other tools. Here is me demonstrating with GnuTLS's certtool that the cert in question correctly validates for the e-mail address alice@smime.example:
0 $ certtool --verify --load-ca-certificate ca.crt --verify-email alice@smime.example --verify-profile ultra < alice.pem Loaded CAs (1 available) Subject: CN=Alice Lovelace Issuer: CN=Sample LAMPS Certificate Authority Checked against: CN=Sample LAMPS Certificate Authority Signature algorithm: RSA-SHA512 Output: Verified. The certificate is trusted. Chain verification output: Verified. The certificate is trusted. 0 $
here are the certs i'm using: