diff options
author | Camilo Viecco <cviecco@mozilla.com> | 2014-09-08 13:09:40 -0700 |
---|---|---|
committer | Camilo Viecco <cviecco@mozilla.com> | 2014-09-08 13:09:40 -0700 |
commit | db482ccf847faeb9d3c9965d4881deb6327d1177 (patch) | |
tree | cc0488b73f9305e741421a84653e739df4de758a /tests/cert/cert.sh | |
parent | ea29417c137ebeb6c3f6ca6ec76c2cdd2615a03d (diff) | |
download | nss-hg-db482ccf847faeb9d3c9965d4881deb6327d1177.tar.gz |
Bug 1057584 - Add gtest framework and initial tests optionally (4/4). Hooks with test suite. r=kaie
Diffstat (limited to 'tests/cert/cert.sh')
-rwxr-xr-x | tests/cert/cert.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/cert/cert.sh b/tests/cert/cert.sh index 1a23c19c4..9f424ff5c 100755 --- a/tests/cert/cert.sh +++ b/tests/cert/cert.sh @@ -945,6 +945,36 @@ cert_ssl() pk12u -o ${R_STAPLINGDIR}/ca.p12 -n TestCA -k ${R_PWFILE} -w ${R_PWFILE} -d ${R_CADIR} pk12u -i ${R_STAPLINGDIR}/ca.p12 -k ${R_PWFILE} -w ${R_PWFILE} -d ${R_STAPLINGDIR} } + +############################# ssl_gtest ########################## +# local shell function to create serve certs for SSL gtests +################################################################## +cert_ssl_gtests() +{ + CERTFAILED=0 + echo "$SCRIPTNAME: Creating ssl_gtest DB dir" + cert_init_cert ${SSLGTESTDIR} "server" 1 ${D_EXT_SERVER} + echo "$SCRIPTNAME: Creating database for ssl_gtests" + certu -N -d "${SSLGTESTDIR}" --empty-password 2>&1 + # the ssl server used here is special: is a self-signed server + # certificate with name server. + echo "$SCRIPTNAME: Creating server cert for ssl_gtests" + certu -S -z ${R_NOISE_FILE} -g 2048 -d ${SSLGTESTDIR} -n server -s "CN=server" -t C,C,C -x -m 1 -w -2 -v 120 -Z SHA256 -1 -2 <<CERTSCRIPT +0 +2 +9 +n +n + +n +CERTSCRIPT + + if [ "$RET" -ne 0 ]; then + echo "return value is $RET" + Exit 6 "Fatal - failed to create server cert for ssl_gtests" + fi +} + ############################## cert_stresscerts ################################ # local shell function to create client certs for SSL stresstest ######################################################################## @@ -1702,6 +1732,7 @@ cert_init cert_all_CA cert_extended_ssl cert_ssl +cert_ssl_gtests cert_smime_client if [ -z "$NSS_TEST_DISABLE_FIPS" ]; then cert_fips |