Problem with gpgsm --import and p12 files issued from a Spanish government agency

Uwe Brauer oub at mat.ucm.es
Fri Feb 20 18:11:29 CET 2026


>>> "WKvG" == Werner Koch via Gnupg-users <gnupg-users at gnupg.org> writes:

> On Tue, 17 Feb 2026 15:52, Uwe Brauer said:
>> gpgsm (GnuPG) 2.4.4

> That is pretty old.  Please use the latest version - at least of 2.4 but
> better the new stable 2.5 version 2.5.7.  We have Debian packages
> available for https://repos.gnupg.org/deb/gnupg/ and the fingerprint of
> the signing key is listed with all release notes.

> If that does not help, please add

>   -v --debug memstat

> to the gpgsm invocation which gives more detailed output.  Should not
> show sensitive information but better check before posting.

It seems that successfully upgraded to 2.5.7
When running  
gpgsm --import New-Certificate.p12

I obtain 
--8<---------------cut here---------------start------------->8---

gpgsm: enabled debug flags: memstat
gpgsm: enabled compatibility flags:
gpgsm: no running gpg-agent - starting '/usr/bin/gpg-agent'
gpgsm: waiting for the agent to come up ... (8s)
gpgsm: connection to the agent established
--8<---------------cut here---------------end--------------->8---

Then a lot of 
lines like gpgsm: total number processed: 4
and then 
--8<---------------cut here---------------start------------->8---
gpgsm:               imported: 1
gpgsm:              unchanged: 2
gpgsm:       secret keys read: 1
gpgsm:   secret keys imported: 1
gpgsm: cert_chain_cache: cached=2
gpgsm: random usage: poolsize=600 mixed=0 polls=0/0 added=0/0
              outmix=0 getlvl1=0/0 getlvl2=0/0
gpgsm: rndjent stat: collector=0x0000000000000000 calls=0 bytes=0
gpgsm: secmem usage: 0/16384 bytes in 0 blocks

gpgsm: DBG: _tlv_parser_new:1985: 0 at 0 (0x0000634260ae4860,7076)
--8<---------------cut here---------------end--------------->8---

So it seems to have worked 
also gpgsm --list-keys

Shows the key.

It is however not clear to me (or better said I forgot) how to tell
gpgsm now to use the new Certificate for signing.


Regards


Uwe Brauer 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5684 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20260220/f6c9e335/attachment.bin>


More information about the Gnupg-users mailing list