Add support for an alternative openssl location, for example when installed

via the Ports Collection.

PR:		166561
Submitted by:	Eugene Grosbein <eugen@grosbein.pp.ru>
This commit is contained in:
Remko Lodder 2013-08-01 19:03:40 +00:00
parent 3103c35e99
commit 153551ecfe
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=324119
2 changed files with 6 additions and 2 deletions

View file

@ -52,6 +52,7 @@ portaudit_confs()
: ${portaudit_pubkey:="%%PREFIX%%/etc/portaudit.pubkey"}
: ${portaudit_fixed=""}
: ${portaudit_openssl:="/usr/bin/openssl"}
}
extract_auditfile_raw()
@ -78,10 +79,10 @@ checksignature_auditfile()
local TMPFILE=`mktemp -t portaudit`
extract_auditfile_raw | egrep "^#SIGNATURE: " | sed "s/^#SIGNATURE: //g" \
| openssl enc -d -a >$TMPFILE
| $portaudit_openssl enc -d -a >$TMPFILE
signatureresult=`extract_auditfile_raw | egrep -v "^#SIGNATURE: " \
| egrep -v "^#CHECKSUM: " \
| openssl dgst -sha256 -verify ${portaudit_pubkey} -signature $TMPFILE`
| $portaudit_openssl dgst -sha256 -verify ${portaudit_pubkey} -signature $TMPFILE`
if [ -n "$TMPFILE" ]; then
rm "$TMPFILE"
fi

View file

@ -17,3 +17,6 @@
# this vulnerability has been fixed in your FreeBSD version
#portaudit_fixed="d2102505-f03d-11d8-81b0-000347a4fa7d"
# Alternative location for openssl
#portaudit_openssl="/usr/bin/openssl"