[Gpg4win-users-en] Can gpg4win import pfx certificate?
Xi Shen
davidshen84 at gmail.com
Wed Feb 7 04:44:44 CET 2018
It worked.
Firstly, I imported the private again using the command you gave. Below is
the output.
C:\Users\A\Documents>gpgsm -vv --import A.pfx
gpgsm: no running gpg-agent - starting 'C:\Program Files
(x86)\Gpg4win\..\GnuPG\bin\gpg-agent.exe'
gpgsm: waiting for the agent to come up ... (5s)
gpgsm: waiting for the agent to come up ... (4s)
gpgsm: connection to agent established
gpgsm: 1240 bytes of 3DES encrypted text
gpgsm: already got an key object, skipping this one
gpgsm: swapping secret primes
gpgsm: DBG: keygrip= 0C ma sk ed 54
gpgsm: total number processed: 1
gpgsm: secret keys read: 1
gpgsm: secret keys unchanged: 1
Note, the last line says the secret key is unchanged. I think it means the
key I imported using the GPA was recognized, not somehow I could not see it.
Then I imported the associated public key.
C:\Users\A\Documents>gpgsm -vv --import A.cer
gpgsm: certificate imported
gpgsm: total number processed: 1
gpgsm: imported: 1
After that, I am able to see the key using
gpgsm --lisk-keys.
I can also see the key from the GPA GUI. However, "gpg --list-keys" still
gives me empty result.
What is the difference between gpg and gpgsm? In Git Bash terminal on
Windows, the gpg command, which comes with the Git for Windows
installation, cannot see my key as well. So I still cannot sign my commits
with my key.
Thanks,
David
On Mon, Feb 5, 2018 at 9:30 PM Bernhard Reiter <bernhard at intevation.de>
wrote:
> Dear Xi,
>
> just seeing your email, sorry for the late response.
>
> Am Freitag 22 Dezember 2017 04:53:13 schrieb Xi Shen:
> > > I am using gpg4win 3.0.2. I tried to import a pfx certificate, which I
> > > exported from my Windows system, and it is protected with a password.
> > > When I import the certificate using the GPA, it says imported
> > > successfully. But I cannot see the key in the manager.
> > >
> > > Does gpg4win really can import a pfx certificate? Or maybe I exported
> the
> > > certificate with wrong settings?
>
> Just guessing that you are trying to import a CMS private and public key
> for
> use with S/MIME?
>
> When reading up on pfx files I learn that they may contain a number of
> objects. So it is hard to say what fails when trying to import it with
> GnuPG.
> My suggestion would be to try the command line with some diagnostic
> messages
> turned on like
> gpgsm -vv --import x.pfx
> and see.
>
> You will need to have the public key for a private key, before you can
> fully
> list it.
>
> Best Regards,
> Bernhard
>
> --
> www.intevation.de/~bernhard +49 541 33 508 3-3
> Intevation GmbH, Osnabrück, DE; Amtsgericht Osnabrück, HRB 18998
> Geschäftsführer Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wald.intevation.org/pipermail/gpg4win-users-en/attachments/20180207/d274d0ce/attachment-0001.html>
More information about the Gpg4win-users-en
mailing list