Lines 52-57
Link Here
|
52 |
: ${portaudit_pubkey:="%%PREFIX%%/etc/portaudit.pubkey"} |
52 |
: ${portaudit_pubkey:="%%PREFIX%%/etc/portaudit.pubkey"} |
53 |
|
53 |
|
54 |
: ${portaudit_fixed=""} |
54 |
: ${portaudit_fixed=""} |
|
|
55 |
: ${portaudit_openssl:="/usr/bin/openssl"} |
55 |
} |
56 |
} |
56 |
|
57 |
|
57 |
extract_auditfile_raw() |
58 |
extract_auditfile_raw() |
Lines 78-87
Link Here
|
78 |
local TMPFILE=`mktemp -t portaudit` |
79 |
local TMPFILE=`mktemp -t portaudit` |
79 |
|
80 |
|
80 |
extract_auditfile_raw | egrep "^#SIGNATURE: " | sed "s/^#SIGNATURE: //g" \ |
81 |
extract_auditfile_raw | egrep "^#SIGNATURE: " | sed "s/^#SIGNATURE: //g" \ |
81 |
| openssl enc -d -a >$TMPFILE |
82 |
| $portaudit_openssl enc -d -a >$TMPFILE |
82 |
signatureresult=`extract_auditfile_raw | egrep -v "^#SIGNATURE: " \ |
83 |
signatureresult=`extract_auditfile_raw | egrep -v "^#SIGNATURE: " \ |
83 |
| egrep -v "^#CHECKSUM: " \ |
84 |
| egrep -v "^#CHECKSUM: " \ |
84 |
| openssl dgst -sha256 -verify ${portaudit_pubkey} -signature $TMPFILE` |
85 |
| $portaudit_openssl dgst -sha256 -verify ${portaudit_pubkey} -signature $TMPFILE` |
85 |
if [ -n "$TMPFILE" ]; then |
86 |
if [ -n "$TMPFILE" ]; then |
86 |
rm "$TMPFILE" |
87 |
rm "$TMPFILE" |
87 |
fi |
88 |
fi |