Re: [gnupg] HOW to check signed files from withing PHP

From: Date: Mon, 23 Jun 2008 12:46:43 +0000
Subject: Re: [gnupg] HOW to check signed files from withing PHP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-275802@lists.php.net to get a copy of this message
Michelle Konzack wrote: > Currently I do things like: > > ----[ '/var/www/debian.devel/htdocs/index.php' > ]------------------------ > > $DIR_BASE=/var/www/customers/konzack > $DIR_HOST=$DIR_BASE/debian.devel > $DIR_TMP=$DIR_BASE/TMP > $DIR_GPG=$DIR_BASE/GNUPG > > exec("sed '^/Format:/,/^$/!d' $DIR_TMP/$UPLOAD_ID/$CHANGES |grep '.' > >$DIR_TMP/$UPLOAD_ID/$CHANGES.txt"); exec("sed '/^-----BEGIN PHP > SIGNATURE/,/^-----END PHP SIGNATURE/p' $DIR_TMP/$UPLOAD_ID/$CHANGES > >$DIR_TMP/$UPLOAD_ID/$CHANGES.sig"); exec("gpg --homedir > $DIR_GPG/GNUPG --verify $DIR_TMP/$UPLOAD_ID/$CHANGES.sig > $DIR_TMP/$UPLOAD_ID/$CHANGES.txt"; FOO; GPGRET); if ($GPGRET) { > $FLAG = "true"; > } else { > echo "I do not like this files...\n"; > exec("rm --force $DIR_TMP/$UPLOAD_ID/* ; rmdir > --ignore-fail-on-non-empty $DIR_TMP/$ID") $FLAG = "false"; > } > ------------------------------------------------------------------------ > > What I realy dislike are the exec() calls. > > Any native PHP5 suggestions which are working faster with less > resources? Why bother with php - just combine the whole thing into one shell-script. /Per Jessen, Zürich

« previous php.general (#275802) next »