gecko/toolkit/crashreporter/client/maemo-unit/opensslverify.sh
Ted Mielczarek 019fb8dad6 bug 557113 - sort out crash report certificate issues on Maemo. r=mfinkle,johnath
--HG--
extra : rebase_source : 5bd378a2721eeef2cb3abc3b54e15429be7c2416
2010-04-09 16:52:04 -04:00

14 lines
374 B
Bash
Executable File

#!/bin/sh
# Run as:
# opensslverify.sh <ca certificate file> <server certificate file>
#
# `openssl verify` doesn't return an error code if the cert fails
# to verify, so we have to grep the output, and we can't do that via
# nsIProcess, so we use a shell script.
if openssl verify -CAfile $1 -purpose sslserver $2 2>&1 | grep -q "^error"; then
exit 1;
else
exit 0;
fi