Re: Automating the generation of master keys

2016-06-02 Thread Aurélien Vallée
So I switched to using GPGME instead of trying to automate GPG. Is there any way to force GPG to use expert mode? I'm having a hard time finding clear option documentation on gpgconf (homedir/gpgconf.conf) and gpg (homedir/gpg.conf) On Thu, Jun 2, 2016 at 9:19 AM, Dashamir Hoxha wrote: > On Thu,

Re: Automating the generation of master keys

2016-06-02 Thread Dashamir Hoxha
On Thu, Jun 2, 2016 at 7:50 AM, Werner Koch wrote: > On Wed, 1 Jun 2016 21:48, dashoho...@gmail.com said: > > > I don't remember exactly why they didn't work, but I think that in > gnupg-2.1 > > Because gpg inserts other prompts depending on version and options. > I tried to change the script t

Re: Automating the generation of master keys

2016-06-01 Thread Werner Koch
On Wed, 1 Jun 2016 21:48, dashoho...@gmail.com said: > I don't remember exactly why they didn't work, but I think that in gnupg-2.1 Because gpg inserts other prompts depending on version and options. > make the logic of the scripts more complex, because my script would have > to take care of al

Re: Automating the generation of master keys

2016-06-01 Thread Dashamir Hoxha
On Wed, Jun 1, 2016 at 7:46 PM, Werner Koch wrote: > > --8<---cut here---start->8--- > local commands="addkey|4|4096|1m|addkey|6|4096|1m|save" > commands=$(echo "$commands" | tr '|' "\n") > script -c "gpg --batch --command-fd=0 --edit-key $GPG_KEY <<< > \"

Re: Automating the generation of master keys

2016-06-01 Thread Dashamir Hoxha
On Wed, Jun 1, 2016 at 9:40 PM, Peter Lebbing wrote: > > Is it an option to upgrade your GnuPG to 2.1? I think it provides for a > less bumpy ride with the pinentry loopback. > I couldn't make "pinentry loopback" work in 2.1.11, so, to be sure, try to upgrade to 2.1.12 where it may work better. _

Re: Automating the generation of master keys

2016-06-01 Thread Peter Lebbing
On 01/06/16 21:20, Aurélien Vallée wrote: > Okay, so I did try to add the sign usage to the master-key. That works > well and avoids the use of expect for generating the keys. I think it's still an odd limitation of the Key-Usage: option that you cannot generate a master key without optional usage

Re: Automating the generation of master keys

2016-06-01 Thread Peter Lebbing
On 01/06/16 19:46, Werner Koch wrote: > ps ax | grep -e '--edit-key' | grep -v grep > > does not work either because you assume that there is only one gpg > command running (actually any process with a string '--edit-key'). ... from any user. That seems odd? Why's the 'a' part of the ps invocat

Re: Automating the generation of master keys

2016-06-01 Thread Aurélien Vallée
Okay, so I did try to add the sign usage to the master-key. That works well and avoids the use of expect for generating the keys. But the problem of pinentry still kind of happens everywhere: --passphrase is now ignored when not in batch mode in gpg2, which means there is no way to provide a passp

Re: Automating the generation of master keys

2016-06-01 Thread Werner Koch
On Wed, 1 Jun 2016 12:47, dashoho...@gmail.com said: > I do it in batch mode like this: > - https://github.com/dashohoxha/egpg/blob/gnupg-2.0/src/cmd/key/gen.sh#L42 Take care: --8<---cut here---start->8--- local commands="addkey|4|4096|1m|addkey|6|4096|1m|

Re: Automating the generation of master keys

2016-06-01 Thread Dashamir Hoxha
On Wed, Jun 1, 2016 at 10:56 AM, Aurélien Vallée wrote: > > So "cert" is a default for primary-keys. If I do not provide any > "Key-Usage", all usages will be set. If I do provide a "Key-Usage", then my > master key is not "certify only" anymore. > I think that certify and sign are very similar,