diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2017-07-18 12:51:45 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2017-07-18 12:51:45 +0300 |
commit | 60f94fef474b48a2ae43d2d151b2c997060c51a7 (patch) | |
tree | d6321aabb02f41c813a89f1e0dc112ca804a06b0 /include/tests_crypto | |
parent | b301a1c108c275a08b2c757ab81bee124a8d3393 (diff) |
[CRYP-7902] prevent test from showing error on screen related to wrong certificate file
Diffstat (limited to 'include/tests_crypto')
-rw-r--r-- | include/tests_crypto | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/tests_crypto b/include/tests_crypto index 968cfce3..14cf92ae 100644 --- a/include/tests_crypto +++ b/include/tests_crypto @@ -54,7 +54,7 @@ COUNT_DIR=$((COUNT_DIR + 1)) LogText "Test: checking certificate ${FILE}" # Check certificate where 'end date' has been expired - EXIT_CODE=$(${OPENSSLBINARY} x509 -noout -checkend 0 -in ${FILE} -enddate > /dev/null ; echo $?) + EXIT_CODE=$(${OPENSSLBINARY} x509 -noout -checkend 0 -in ${FILE} -enddate 2> /dev/null ; echo $?) CERT_CN=$(${OPENSSLBINARY} x509 -noout -subject -in ${FILE} 2> /dev/null | ${SEDBINARY} -e 's/^subject.*CN=\([a-zA-Z0-9\.\-\*]*\).*$/\1/') CERT_NOTAFTER=$(${OPENSSLBINARY} x509 -noout -enddate -in ${FILE} 2> /dev/null | ${AWKBINARY} -F= '{if ($1=="notAfter") { print $2 }}') Report "certificate[]=${FILE}|${EXIT_CODE}|cn:${CERT_CN};notafter:${CERT_NOTAFTER};|" |