diff options
author | ian.mcgreer%sun.com <devnull@localhost> | 2002-11-14 20:39:25 +0000 |
---|---|---|
committer | ian.mcgreer%sun.com <devnull@localhost> | 2002-11-14 20:39:25 +0000 |
commit | 7d82daa54eaa0f80f9ec7a489c997e431f1fc42a (patch) | |
tree | 0fbadd0719db00622ecdd00e5e9c1c0569935c6e /security/nss/tests | |
parent | b9d03cc251a1d39de1aa29c7f7aaca58661575af (diff) | |
download | nss-hg-7d82daa54eaa0f80f9ec7a489c997e431f1fc42a.tar.gz |
* handle command-line passwords
* unwrap methods must take key type (PKCS#11 demands it)
* add more tests
Diffstat (limited to 'security/nss/tests')
-rw-r--r-- | security/nss/tests/stan/stan.sh | 73 | ||||
-rw-r--r-- | security/nss/tests/stan/stanExpired.b64 | 11 |
2 files changed, 84 insertions, 0 deletions
diff --git a/security/nss/tests/stan/stan.sh b/security/nss/tests/stan/stan.sh index 467d69ad0..c9ac00361 100644 --- a/security/nss/tests/stan/stan.sh +++ b/security/nss/tests/stan/stan.sh @@ -127,6 +127,23 @@ pkiu() return $RET } +pkiuf() +{ + echo "" + echo ">>>>>>>>>>>>>> ${PKIU_ACTION} <<<<<<<<<<<<<<" + echo "pkiutil $*" + pkiutil $* + RET=$? + if [ "$RET" -ne ${FAILURE_CODE} ]; then + CERTFAILED=$RET + html_failed "<TR><TD>${PKIU_ACTION} ($RET) " + cert_log "ERROR: ${PKIU_ACTION} failed $RET" + else + html_passed "<TR><TD>${PKIU_ACTION}" + fi + return $RET +} + cert_init cd ${HOSTDIR} cp ${QADIR}/stan/*.b64 . @@ -172,4 +189,60 @@ if [ "$RET" -ne 0 ]; then Exit 6 "Fatal - failed ${PKIU_ACTION} [$RET]" fi +PKIU_ACTION="List Certs" +pkiu -L -d ${SERVERDIR} +if [ "$RET" -ne 0 ]; then + Exit 6 "Fatal - failed ${PKIU_ACTION} [$RET]" +fi + +PKIU_ACTION="Attempt Validation of Server Cert (FAIL)" +FAILURE_CODE=255 +pkiuf -V -d ${SERVERDIR} -n stanCert -u cv +if [ "$RET" -ne ${FAILURE_CODE} ]; then + Exit 6 "Fatal - failed ${PKIU_ACTION} [$RET]" +fi + +PKIU_ACTION="Set Root Cert Trust" +pkiu -M -d ${SERVERDIR} -n stanRoot -u CV +if [ "$RET" -ne 0 ]; then + Exit 6 "Fatal - failed ${PKIU_ACTION} [$RET]" +fi + +PKIU_ACTION="Validate Server Cert" +pkiu -V -d ${SERVERDIR} -n stanCert -u cv +if [ "$RET" -ne 0 ]; then + Exit 6 "Fatal - failed ${PKIU_ACTION} [$RET]" +fi + +PKIU_ACTION="Export Copy of Server Cert" +pkiu -E -d ${SERVERDIR} -n stanCert --type cert -a -o stanCertCopy.b64 +if [ "$RET" -ne 0 ]; then + Exit 6 "Fatal - failed ${PKIU_ACTION} [$RET]" +fi + +PKIU_ACTION="Import Expired Cert" +pkiu ${PKIU_IMPORT} -n stanExpired -i stanExpired.b64 +if [ "$RET" -ne 0 ]; then + Exit 6 "Fatal - failed ${PKIU_ACTION} [$RET]" +fi + +PKIU_ACTION="Attempt Validation of Expired Cert (FAIL)" +FAILURE_CODE=255 +pkiuf -V -d ${SERVERDIR} -n stanExpired -u cv +if [ "$RET" -ne ${FAILURE_CODE} ]; then + Exit 6 "Fatal - failed ${PKIU_ACTION} [$RET]" +fi + +PKIU_ACTION="Delete Expired Cert" +pkiu -D -d ${SERVERDIR} -n stanExpired +if [ "$RET" -ne 0 ]; then + Exit 6 "Fatal - failed ${PKIU_ACTION} [$RET]" +fi + +PKIU_ACTION="List Certs" +pkiu -L -d ${SERVERDIR} +if [ "$RET" -ne 0 ]; then + Exit 6 "Fatal - failed ${PKIU_ACTION} [$RET]" +fi + cert_cleanup diff --git a/security/nss/tests/stan/stanExpired.b64 b/security/nss/tests/stan/stanExpired.b64 new file mode 100644 index 000000000..ff08c3e39 --- /dev/null +++ b/security/nss/tests/stan/stanExpired.b64 @@ -0,0 +1,11 @@ +MIICATCCAWqgAwIBAgIEZWcRQDANBgkqhkiG9w0BAQQFADAzMQswCQYDVQQIEwJT +UDENMAsGA1UEChMEU3RhbjEVMBMGA1UEAxMMVGVzdGluZyBDQSAxMB4XDTAxMTEx +NDE4MDg1M1oXDTAyMDgxNDE4MDg1M1owMzELMAkGA1UECBMCU1AxDTALBgNVBAoT +BFN0YW4xFTATBgNVBAMTDEV4cGlyZWQgQ2VydDCBnzANBgkqhkiG9w0BAQEFAAOB +jQAwgYkCgYEAljP7L17O29XWzbQIUqMfGIfhi7sQcs9+j8Qvs2ck1TPrbkkORD2D +CXx9sj9CNWF3kwZ31fCfjxj2ZT3bYJDAip6aozHUaJlHCA/JVwSLbaJXcV94uTfQ +lo3DRG11ZQJXUUrP0V/l4w6y8Yuqyj/dOYrX+UsQrvTCX1zuAJocCukCAwEAAaMi +MCAwEQYJYIZIAYb4QgEBBAQDAgbAMAsGA1UdDwQEAwIDmDANBgkqhkiG9w0BAQQF +AAOBgQCARJvR0P/CjSfTxqNgYhAVzkfadv3LvA4Yyf93MMlfG260yWybyOBHh6ck +YtdEVyyQ7mdGDPatqEMyX4Zhd4x4VeuFWGbHs2DGRiTp/vNkXk2+flnaOoyU2brX +a8RqQN9zsCeZOuE5CM3jC87GiLLJWjdsxqwEaKnESACRtf59Ww== |