I'm using gpg4win and I'm trying to export my gpg private key to a p12 format (to import it in Lotus Notes). According to my understanding I need to:
gpgsm.exe -o "XXXXXXXX_private.p12" --export-secret-key-p12 0xXXXXXXXX
However, I'm getting the following error : "No secret Key"
Actually, gpgsm -K does not return anything at all (where gpg -K works).
What am I missing ?
Best Answer
I think you are using the wrong program;
pgpsm
is used to sign, check, encrypt or decrypt using the S/MIME protocol.I do not have
pgp4win
at hand, but according to the man page, this should export your public and secret key:The info on
pkcs12
is the following,so I included the
--cert
option, without reflection about that option:I did some more tests (now with gpg4win), and partially have to contradict myself. The
gpgsm
tool in gpg4win describes itself aswhich indeed sounds correct.
So, your command posted in the question seems totally sensible, I only have two more clues:
-a
option