gpg via cgi under BSDi
Sebastian Henschel
shensche@defcom.de
Tue, 18 Jan 2000 11:26:25 +0100
hi folks!
as you can imagine (cause of the subject) i have problems with gpg
(1.0.1) under BSDi v3.1.
research in the listings gave me the patch to get gpg compiled under
BSDi. it also works on the command line. but if i try to call it via a
cgi it stops working before it starts encoding.
if have no passphrase for the secret key but that should be ok, cause
the cgi-user won't decrypt anything sent to him.
i call gpg like that:
gpg --debug-all --encrypt --armor --no-tty --batch --homedir
/foobar/.gnupg --recipient someone@somewhere.com
input comes from stdin, output goes to stdout. it does not matter if i
specify a file for input and/or a file for output. on my linux box this
works just fine, i can even omit the --batch and --no-tty args.
i have two log snippets here, the first from the working commmand-line
call:
-------------------- snip
-------------------------------------------------------------
gpg: DBG: Ooops, m_size called
gpg: DBG: mpi_free_limb_space of size 0
gpg: DBG: iobuf-4.0: underflow: req=8192 got=0 rc=-1
gpg: DBG: /foobar/.gnupg/secring.gpg: close fd 3
gpg: DBG: iobuf-4.0: underflow: eof
gpg: DBG: iobuf-4.0: close `(null)'
gpg: DBG: check_trust() returns trustlevel 0005.
gpg: DBG: iobuf-6.0: open `[stdin]' fd=0
gpg: DBG: iobuf-7.0: create `file_filter'
gpg: DBG: armor-filter: control: 5
gpg: DBG: iobuf-7.1: push `armor_filter'
gpg: DBG: armor-filter: control: 5
gpg: DBG: iobuf chain: 7.1 `armor_filter' filter_eof=0 start=0 len=0
gpg: DBG: iobuf chain: 7.0 `file_filter' filter_eof=0 start=0 len=0
gpg: DBG: armor-filter: control: 1
gpg: DEK is: 82 07 A9 27 91 5A B1 97 EF E7 26 77 42 64 B9 02
gpg: DBG: mpi_alloc_secure(2048)
gpg: DBG: mpi_alloc_limb_space(2048)
gpg: DBG: pubkey_encrypt: algo=16
gpg:
pkey:D9505D44E90758442F8056BCE8364C85739424C1ACFD1AB9DFD1B5ABAF91FADCA756
-------------------- snap
-------------------------------------------------------------
and then it starts encoding...
now the log from the cgi-call:
-------------------- snip
-------------------------------------------------------------
gpg: DBG: Ooops, m_size called
gpg: DBG: mpi_free_limb_space of size 0
gpg: DBG: iobuf-4.0: underflow: req=8192 got=0 rc=-1
gpg: DBG: /foobar/.gnupg/secring.gpg: close fd 8
gpg: DBG: iobuf-4.0: underflow: eof
gpg: DBG: iobuf-4.0: close `(null)'
gpg: DBG: check_trust() returns trustlevel 0005.
gpg: DBG: iobuf-6.0: open `[stdin]' fd=0
gpg: DBG: iobuf-7.0: create `file_filter'
gpg: DBG: armor-filter: control: 5
gpg: DBG: iobuf-7.1: push `armor_filter'
gpg: DBG: armor-filter: control: 5
gpg: DBG: iobuf chain: 7.1 `armor_filter' filter_eof=0 start=0 len=0
gpg: DBG: iobuf chain: 7.0 `file_filter' filter_eof=0 start=0 len=0
gpg: DBG: armor-filter: control: 1
-------------------- snap
-------------------------------------------------------------
as you can see, it stops before this DEK (whatever that is, looks
somehow like a fingerprint) thing is done. well, stopping is not the
right term. it just hangs and does nothing more, no quitting, no
advancing :(
i would appreciate some help here.
keep up the excellent work, tia,
sebastian
--
defcom webdressing gmbh
ohlauer str. 42
10999 berlin
phone: +49 30 617 76 999