Generating GnuPG S/MINE key pair

Dan Bryant dkbryant at gmail.com
Tue Apr 28 18:12:18 CEST 2015


OK... I'm apparently suffering from a bad gpgsm setup.  According to
the 2011 post (https://lists.gnupg.org/pipermail/gnupg-devel/2011-March/025989.html)
the following command, should just work:
   gpgsm --gen-key | gpgsm --import

Not for me... I get
  gpgsm: problem looking for existing certificate: Invalid argument
  gpgsm: error storing certificate

Moreover just trying to dump my keystore with "gpgsm -k" gives errors
  gpgsm: keydb_search failed: Invalid argument

Here's a dump of my failed import attempt.
----
C:\Program Files (x86)\GNU\GnuPG>gpgsm --gen-key | gpgsm --import
gpgsm (GnuPG) 2.1.3; Copyright (C) 2015 Free Software Foundation,
This is free software: you are free to change and redistribute it
There is NO WARRANTY, to the extent permitted by law.

Please select what kind of key you want:
   (1) RSA
   (2) Existing key
   (3) Existing key from card
Your selection? 1
What keysize do you want? (2048)
Requested keysize is 2048 bits
Possible actions for a RSA key:
   (1) sign, encrypt
   (2) sign
   (3) encrypt
Your selection? 1
Enter the X.509 subject name: CN=test cert
Enter email addresses (end with an empty line):
>
Enter DNS names (optional; end with an empty line):
>
Enter URIs (optional; end with an empty line):
>
Create self-signed certificate? (y/N) y
These parameters are used:
    Key-Type: RSA
    Key-Length: 2048
    Key-Usage: sign, encrypt
    Serial: random
    Name-DN: CN=test cert

Proceed with creation? (y/N) y
Now creating self-signed certificate.  This may take a while ...
gpgsm: about to sign the certificate for key: &77C68CE5AC362254D7
gpgsm: certificate created
Ready.
gpgsm: problem looking for existing certificate: Invalid argument
gpgsm: error storing certificate
gpgsm: total number processed: 1
gpgsm:           not imported: 1
----



More information about the Gnupg-users mailing list