mozilla / mig

Distributed & real time digital forensics at the speed of the cloud
http://mig.mozilla.org/
Mozilla Public License 2.0
1.21k stars 234 forks source link

[mig client] Add support for GNUPG 2.1 #190

Open hxjuneja opened 8 years ago

hxjuneja commented 8 years ago

Currently, MIG is only compatible with GNUPG version 1.x and 2.x and looks for a secring.pgp on startup. In the GNUPG version 2.1 secring.gpg file is not used anymore and only gpg-agent is responsible for the private parts of the keys.

It will be nice to make MIG compatible with GNUPG 2.1 while maintaining the support for version 2.x and 1.x. This can be implemented either by asking gpg-agent for the keys when secring.gpg is not found or by looking for GNUPG version upfront and proceeding accordingly.

For more info about the changes in version 2.1 see:

https://www.gnupg.org/faq/whats-new-in-2.1.html

jvehent commented 8 years ago

I have not tested gnupg 2.1, but mig should already talk to gpg-agent if the socket is present. Did you verify that this isn't working as expected?

gdestuynder commented 8 years ago

in newer GPG the socket is no longer advertised by the environment so I suspect its not being picked up i suspect --extra-socket option of the agent can be used as a work around, while manually setting the env to point to it for ex.

Alternatively the standard socket path is always: /run/user/UID_HERE/gnupg/S.gpg-agent (though the go lib doesnt seem to be able to pick it up even if its provided in env GPG_AGENT_INFO)

kpcyrd commented 7 years ago

I'm using a separate folder for my investigator key and I've worked around this with:

gpg --export-secret-keys > my_gpg_folder/secring.gpg
gdestuynder commented 7 years ago

I'm doing the same though it's annoying to have to type the passphrase every time ;-)

2011aad commented 6 years ago

The method from @kpcyrd really works, but need to copy xxxxx.key in private-keys-v1.d/ folder to the same place with secring.gpg. It would be better to support GNUPG 2.x

ghost commented 5 years ago

any updates on this?