Gpgsm -a --export-secret-key-p12 [keyid] under windows displaying the error message "No private key"

installed gpg4win 2.2 version. I have successfully generated a certificate using gpgsm --gen-key> test.p10

I want to export the generated certificate request to pkcs12 format using gpgsm --export-secret-key-p12, but when exporting to p12 I get the error "No private key"

When I run gpgsm -list-secret-keys on the command line, it really doesn't display anything.

Why did the export step fail? and where are the private keys present when creating certificates?

+3


source to share


1 answer


I have successfully generated a certificate using gpgsm -gen-key> test.p10

GpgSM from gpg4win-2.x can generate certificate signing requests.

It stores the secret part of your certificate under% APPDATA% \ gnupg \ private-keys-v1.d and prints out the signing request. This chant request is supposed to be sent to the CA that signs your certificate (like cacert).



Then you will import the signed certificate and then display unter -list-secret-keys and will export.

As of GnuPG 2.1 (can be downloaded as Windows Installer from gnupg.org), you are asked when you create a key if you want it yourself. In this case, your "test.p10" will contain a signed certificate, which can then be imported into gpgsm and directly used / exported without the need for a CA.

0


source







All Articles