Change GnuPG key trust from within PHP

Gerhard gerhard at popmail.at
Wed Nov 7 20:38:07 CET 2007


Hi!

I tried to implement gnupgp to my webmail program (written in php) via the
PECL extension gnupg-1.3.1 but it was not possible to change the trust for
the keys of the keyring. Then i tried the same via command line from within
php. This was also not working.

I tried it via the --batch command but it is only possible to retrieve the
trust information but not to change them. The command i tried first was ...
"/usr/local/bin/gpg --home <gnupg-home-dir> --edit-key <key-id> trust 2>&1"
... On this command i got the following error message ...
"gpg: cannot open `/dev/tty': Device not configured"

I tried also to interactive talk to the process but it is also the same
error message. :-(

With the --no-tty option it is also not working. It also shows the message
"gpg: Sorry, no terminal at all requested - can't get input" ... so it is
also not wirking.

Afterwards i tried it with the --batch command which allowed me to get the
trust information but to set it was also not possible.

Is there any possibility to set the trust information of a public key via
the php commandline?

Or is there maybe a work around or something similar to go around this
problem?


Bye
Gerhard




More information about the Gnupg-users mailing list