Page MenuHome GnuPG

gpgsm --import should not try to invoke dirmngr if it is not necessary
Open, LowPublic

Description

The atttached smime-encrypted.p12 file contains no references to any external CRLs or OCSP or other network resources:

However, if i try to run:

gpgsm --pinentry-mode=loopback --passphrase-fd 4 4<<<'' --batch --quiet --import < smime-encrypted.p12

but without dirmngr installed, gpgsm returns an error, with these warning messages:

gpgsm: 992 bytes of 3DES encrypted text
gpgsm: processing certBag
gpgsm: failed to start the dirmngr '/usr/bin/dirmngr': No such file or directory
gpgsm: connecting dirmngr at '/run/user/1000/gnupg/d.68qhx4nqttozwi79hawnajfi/S.dirmngr' failed: No such file or directory
gpgsm: failed to start the dirmngr '/usr/bin/dirmngr': No such file or directory
gpgsm: connecting dirmngr at '/run/user/1000/gnupg/d.68qhx4nqttozwi79hawnajfi/S.dirmngr' failed: No such file or directory
gpgsm: issuer certificate (#/CN=Sample LAMPS Certificate Authority) not found
gpgsm: failed to start the dirmngr '/usr/bin/dirmngr': No such file or directory
gpgsm: connecting dirmngr at '/run/user/1000/gnupg/d.68qhx4nqttozwi79hawnajfi/S.dirmngr' failed: No such file or directory
gpgsm: failed to start the dirmngr '/usr/bin/dirmngr': No such file or directory
gpgsm: connecting dirmngr at '/run/user/1000/gnupg/d.68qhx4nqttozwi79hawnajfi/S.dirmngr' failed: No such file or directory
gpgsm: 872 bytes of 3DES encrypted text
gpgsm: processing certBag
gpgsm: 1224 bytes of 3DES encrypted text
gpgsm: DBG: keygrip= D3 E5 44 6E 1D 01 22 86 F3 97 4B F4 BB CD 56 19 4A 2B E5 FC

I can avoid these warnings and the error return by supplying --disable-dirmngr

But if there is no reason to invoke dirmngr, gpgsm shouldn't warn or fail if it is not available.

Details

Version
2.2.17