1999-05-13 19:37:32 +08:00
|
|
|
$! TESTSSL.COM
|
|
|
|
$
|
2011-03-19 18:58:14 +08:00
|
|
|
$ __arch = "VAX"
|
2009-05-16 00:36:56 +08:00
|
|
|
$ if f$getsyi("cpu") .ge. 128 then -
|
2010-01-27 17:18:42 +08:00
|
|
|
__arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
|
2011-03-19 18:58:14 +08:00
|
|
|
$ if __arch .eqs. "" then __arch = "UNK"
|
|
|
|
$!
|
|
|
|
$ if (p4 .eqs. "64") then __arch = __arch+ "_64"
|
|
|
|
$!
|
|
|
|
$ texe_dir = "sys$disk:[-.''__arch'.exe.test]"
|
|
|
|
$ exe_dir = "sys$disk:[-.''__arch'.exe.apps]"
|
2000-03-14 06:27:52 +08:00
|
|
|
$
|
|
|
|
$ if p1 .eqs. ""
|
|
|
|
$ then
|
|
|
|
$ key="[-.apps]server.pem"
|
|
|
|
$ else
|
|
|
|
$ key=p1
|
|
|
|
$ endif
|
|
|
|
$ if p2 .eqs. ""
|
|
|
|
$ then
|
|
|
|
$ cert="[-.apps]server.pem"
|
|
|
|
$ else
|
|
|
|
$ cert=p2
|
|
|
|
$ endif
|
2011-03-19 18:58:14 +08:00
|
|
|
$ ssltest = "mcr ''texe_dir'ssltest -key ''key'"+ -
|
|
|
|
" -cert ''cert' -c_key ''key' -c_cert ''cert'"
|
|
|
|
$!
|
2010-11-19 06:44:48 +08:00
|
|
|
$ set noon
|
2000-03-18 17:11:00 +08:00
|
|
|
$ define/user sys$output testssl-x509-output.
|
2000-03-14 06:27:52 +08:00
|
|
|
$ define/user sys$error nla0:
|
|
|
|
$ mcr 'exe_dir'openssl x509 -in 'cert' -text -noout
|
|
|
|
$ define/user sys$error nla0:
|
2000-03-18 17:11:00 +08:00
|
|
|
$ search/output=nla0: testssl-x509-output. "DSA Public Key"/exact
|
2000-03-14 06:27:52 +08:00
|
|
|
$ if $severity .eq. 1
|
|
|
|
$ then
|
2011-03-19 18:58:14 +08:00
|
|
|
$ dsa_cert = "YES"
|
2000-03-14 06:27:52 +08:00
|
|
|
$ else
|
2011-03-19 18:58:14 +08:00
|
|
|
$ dsa_cert = "NO"
|
2000-03-14 06:27:52 +08:00
|
|
|
$ endif
|
2000-03-18 17:11:00 +08:00
|
|
|
$ delete testssl-x509-output.;*
|
2000-03-14 06:27:52 +08:00
|
|
|
$
|
|
|
|
$ if p3 .eqs. ""
|
|
|
|
$ then
|
|
|
|
$ copy/concatenate [-.certs]*.pem certs.tmp
|
|
|
|
$ CA = """-CAfile"" certs.tmp"
|
|
|
|
$ else
|
|
|
|
$ CA = """-CAfile"" "+p3
|
|
|
|
$ endif
|
|
|
|
$
|
|
|
|
$!###########################################################################
|
1999-05-13 19:37:32 +08:00
|
|
|
$
|
|
|
|
$ write sys$output "test sslv3"
|
2000-03-14 06:27:52 +08:00
|
|
|
$ 'ssltest' -ssl3
|
1999-05-13 19:37:32 +08:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
|
|
|
$ write sys$output "test sslv3 with server authentication"
|
2000-03-14 06:27:52 +08:00
|
|
|
$ 'ssltest' -ssl3 -server_auth 'CA'
|
1999-05-13 19:37:32 +08:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
|
|
|
$ write sys$output "test sslv3 with client authentication"
|
2000-03-14 06:27:52 +08:00
|
|
|
$ 'ssltest' -ssl3 -client_auth 'CA'
|
1999-05-13 19:37:32 +08:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
|
|
|
$ write sys$output "test sslv3 with both client and server authentication"
|
2000-03-14 06:27:52 +08:00
|
|
|
$ 'ssltest' -ssl3 -server_auth -client_auth 'CA'
|
1999-05-13 19:37:32 +08:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
|
|
|
$ write sys$output "test sslv2/sslv3"
|
2000-03-14 06:27:52 +08:00
|
|
|
$ 'ssltest'
|
1999-05-13 19:37:32 +08:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
|
|
|
$ write sys$output "test sslv2/sslv3 with server authentication"
|
2000-03-14 06:27:52 +08:00
|
|
|
$ 'ssltest' -server_auth 'CA'
|
1999-05-13 19:37:32 +08:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
|
|
|
$ write sys$output "test sslv2/sslv3 with client authentication"
|
2000-03-14 06:27:52 +08:00
|
|
|
$ 'ssltest' -client_auth 'CA'
|
1999-05-13 19:37:32 +08:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
|
|
|
$ write sys$output "test sslv2/sslv3 with both client and server authentication"
|
2000-03-14 06:27:52 +08:00
|
|
|
$ 'ssltest' -server_auth -client_auth 'CA'
|
1999-05-13 19:37:32 +08:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
1999-07-29 07:25:59 +08:00
|
|
|
$ write sys$output "test sslv3 via BIO pair"
|
2000-03-14 06:27:52 +08:00
|
|
|
$ 'ssltest' -bio_pair -ssl3
|
1999-07-29 07:25:59 +08:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
|
|
|
$ write sys$output "test sslv3 with server authentication via BIO pair"
|
2000-03-14 06:27:52 +08:00
|
|
|
$ 'ssltest' -bio_pair -ssl3 -server_auth 'CA'
|
1999-07-29 07:25:59 +08:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
|
|
|
$ write sys$output "test sslv3 with client authentication via BIO pair"
|
2000-03-14 06:27:52 +08:00
|
|
|
$ 'ssltest' -bio_pair -ssl3 -client_auth 'CA'
|
1999-07-29 07:25:59 +08:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
|
|
|
|
$ write sys$output "test sslv3 with both client and server authentication via BIO pair"
|
2000-03-14 06:27:52 +08:00
|
|
|
$ 'ssltest' -bio_pair -ssl3 -server_auth -client_auth 'CA'
|
1999-07-29 07:25:59 +08:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
|
|
|
$ write sys$output "test sslv2/sslv3 via BIO pair"
|
2000-03-14 06:27:52 +08:00
|
|
|
$ 'ssltest'
|
1999-07-29 07:25:59 +08:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
2000-03-14 06:27:52 +08:00
|
|
|
$ if .not. dsa_cert
|
|
|
|
$ then
|
|
|
|
$ write sys$output "test sslv2/sslv3 w/o DHE via BIO pair"
|
|
|
|
$ 'ssltest' -bio_pair -no_dhe
|
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$ endif
|
|
|
|
$
|
|
|
|
$ write sys$output "test sslv2/sslv3 with 1024 bit DHE via BIO pair"
|
|
|
|
$ 'ssltest' -bio_pair -dhe1024dsa -v
|
1999-11-12 09:43:55 +08:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
1999-07-29 07:25:59 +08:00
|
|
|
$ write sys$output "test sslv2/sslv3 with server authentication"
|
2000-03-14 06:27:52 +08:00
|
|
|
$ 'ssltest' -bio_pair -server_auth 'CA'
|
1999-07-29 07:25:59 +08:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
|
|
|
$ write sys$output "test sslv2/sslv3 with client authentication via BIO pair"
|
2000-03-14 06:27:52 +08:00
|
|
|
$ 'ssltest' -bio_pair -client_auth 'CA'
|
1999-07-29 07:25:59 +08:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
|
|
|
$ write sys$output "test sslv2/sslv3 with both client and server authentication via BIO pair"
|
2000-03-14 06:27:52 +08:00
|
|
|
$ 'ssltest' -bio_pair -server_auth -client_auth 'CA'
|
1999-07-29 07:25:59 +08:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
2000-03-14 06:27:52 +08:00
|
|
|
$!###########################################################################
|
|
|
|
$
|
|
|
|
$ define/user sys$output nla0:
|
|
|
|
$ mcr 'exe_dir'openssl no-rsa
|
2002-12-13 02:43:10 +08:00
|
|
|
$ no_rsa=$SEVERITY
|
|
|
|
$ define/user sys$output nla0:
|
2015-05-26 20:32:57 +08:00
|
|
|
$ mcr 'exe_dir'openssl no-dhparam
|
2002-12-13 02:43:10 +08:00
|
|
|
$ no_dh=$SEVERITY
|
|
|
|
$
|
|
|
|
$ if no_dh
|
|
|
|
$ then
|
|
|
|
$ write sys$output "skipping anonymous DH tests"
|
|
|
|
$ else
|
|
|
|
$ write sys$output "test tls1 with 1024bit anonymous DH, multiple handshakes"
|
|
|
|
$ 'ssltest' -v -bio_pair -tls1 -cipher "ADH" -dhe1024dsa -num 10 -f -time
|
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$ endif
|
|
|
|
$
|
|
|
|
$ if no_rsa
|
2000-03-14 06:27:52 +08:00
|
|
|
$ then
|
|
|
|
$ write sys$output "skipping RSA tests"
|
|
|
|
$ else
|
|
|
|
$ write sys$output "test tls1 with 1024bit RSA, no DHE, multiple handshakes"
|
|
|
|
$ mcr 'texe_dir'ssltest -v -bio_pair -tls1 -cert [-.apps]server2.pem -no_dhe -num 10 -f -time
|
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
2002-12-13 02:43:10 +08:00
|
|
|
$ if no_dh
|
|
|
|
$ then
|
|
|
|
$ write sys$output "skipping RSA+DHE tests"
|
|
|
|
$ else
|
|
|
|
$ write sys$output "test tls1 with 1024bit RSA, 1024bit DHE, multiple handshakes"
|
|
|
|
$ mcr 'texe_dir'ssltest -v -bio_pair -tls1 -cert [-.apps]server2.pem -dhe1024dsa -num 10 -f -time
|
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$ endif
|
2000-03-14 06:27:52 +08:00
|
|
|
$ endif
|
|
|
|
$
|
1999-05-13 19:37:32 +08:00
|
|
|
$ RET = 1
|
|
|
|
$ goto exit
|
|
|
|
$ exit3:
|
|
|
|
$ RET = 3
|
|
|
|
$ exit:
|
2000-03-18 17:11:00 +08:00
|
|
|
$ if p3 .eqs. "" then delete certs.tmp;*
|
2010-11-19 06:44:48 +08:00
|
|
|
$ set on
|
1999-05-13 19:37:32 +08:00
|
|
|
$ exit 'RET'
|