Toon posts:

[php]PGP/GnuPGP signing string

Pagina: 1
Acties:

Verwijderd

Topicstarter
Even in het engels: (copy paste in newsgroup en formums methode :))

Hi!

I want to sign a string with gnupgp. Encrypting a string works like this:

echo jajajajaja | gpg -a --always-trust --batch --no-secmem-warning -e -u user
-r email@mail.com

However if I try to SIGN a message and replace the -e (encrypting) by -s I get:

gpg: can't query password in batchmode
gpg: skipped `evider.net': bad passphrase
gpg: signing failed: bad passphrase

How can I sign this without problems?
If I remove the --batch and executed in the shell I'm prompted for my passphrase.

But how can I get php to "put in" the phrase at this prompt?

Thnx!

  • chem
  • Registratie: Oktober 2000
  • Laatst online: 27-08 13:53

chem

Reist de wereld rond

je zou met
'jouw-stukkie' < echo passphrase wellicht iets kunnen doen...

Klaar voor een nieuwe uitdaging.


  • LuCarD
  • Registratie: Januari 2000
  • Niet online

LuCarD

Certified BUFH

Volgens mij kan het niet met PHP... Maar ik denk dat je het moet zoeken in shellscripting....

En daar heb ik geen kaas van gegeten.. :'(

En volgens mij past deze topic dan ook beter in NOS

Programmer - an organism that turns coffee into software.


Verwijderd

[topic=42723/1/25]