How to lsign-key from batch ?

Nick Dearnaley ndearnaley@imerge.co.uk
Fri Mar 2 18:25:06 2001


Timo,

Thanks for your quick reply. I seem to be much closer, but I'm still
having problems. I'm generating the command line using the code given
below:

	std::string command;
	command.assign("echo -e 'y\n");
	command.append(passphrase);
	command.append("\n' | gpg --command-fd 0 --status-fd 1 --default-key
");
	command.append(email);
	command.append(" --lsign-key '");
	command.append(ROOT_KEY_EMAIL);
	command.append("'");

	if (system(command.c_str())!=0) {

But I consistantly get the following:

	gpg: Warning: using insecure memory!

	pub  1024D/E3CF9CF0  created: 2001-03-02 expires: never      trust: f/q
	sub  1024g/BAB73012  created: 2001-03-02 expires: never     
	(1)  Root Key v1.2 <root-1.2@imerge.co.uk>


	pub  1024D/E3CF9CF0  created: 2001-03-02 expires: never      trust: f/q
	             Fingerprint: 50A7 1BDE EC4D E798 9DAF  D754 E45A D904 E3CF
9CF0

	     Root Key v1.2 <root-1.2@imerge.co.uk>

	Are you really sure that you want to sign this key
	with your key: "testing <test@imerge.co.uk>"

	The signature will be marked as non-exportable.

	Key not changed so no update needed.

It looks as if it is trying to sign the key, but the change is not
occurring. This happens using the command from the command line too.  I
also tried routing the commands and the passphrase through seperate
fd's, but that didn't seem to help.

Any thoughts? The section on command-fd is not present in docs/DETAILS,
but if you know another source then feel free to just point me at it.
Thanks again.

Nick Dearnaley
Timo Schulz wrote:

>
> On Fri Mar 02 2001, Nick Dearnaley wrote:
>
> > Can anyone tell me whether this is possible, and if so hiow to do it?
> > Thanks.
>
> There is an option '--command-fd=fd' with it, GPG read all input
> from the given file descriptor 'fd'.
>
> In your situation you can put all needed answers for GPG
> into a single text file.
>
> Timo
>
> --
> Two-a-Day at WinPT.org keyid BF3DF9B4 http://www.WinPT.org
> _______________________________________________
> Gnupg-users mailing list
> Gnupg-users@gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gnupg-users
-- Nick Dearnaley Software Team Leader, Imerge Ltd. ----------------------------------------- ndearnaley@imerge.co.uk Tel: 01954 783600 Fax: 01954 783601 htpp://www.imerge.co.uk -----------------------------------------