1999-05-13 11:37:32 +00:00
|
|
|
$! TESTSSL.COM
|
|
|
|
$
|
|
|
|
$ __arch := VAX
|
|
|
|
$ if f$getsyi("cpu") .ge. 128 then __arch := AXP
|
2000-03-13 22:27:52 +00:00
|
|
|
$ texe_dir := sys$disk:[-.'__arch'.exe.test]
|
|
|
|
$ exe_dir := sys$disk:[-.'__arch'.exe.apps]
|
|
|
|
$
|
|
|
|
$ if p1 .eqs. ""
|
|
|
|
$ then
|
|
|
|
$ key="[-.apps]server.pem"
|
|
|
|
$ else
|
|
|
|
$ key=p1
|
|
|
|
$ endif
|
|
|
|
$ if p2 .eqs. ""
|
|
|
|
$ then
|
|
|
|
$ cert="[-.apps]server.pem"
|
|
|
|
$ else
|
|
|
|
$ cert=p2
|
|
|
|
$ endif
|
|
|
|
$ ssltest := mcr 'texe_dir'ssltest -key 'key' -cert 'cert' -c_key 'key' -c_cert 'cert'
|
|
|
|
$
|
|
|
|
$ define/user sys$output test-ssltest-output.
|
|
|
|
$ define/user sys$error nla0:
|
|
|
|
$ mcr 'exe_dir'openssl x509 -in 'cert' -text -noout
|
|
|
|
$ set noon
|
|
|
|
$ define/user sys$error nla0:
|
|
|
|
$ search/output=nla0: testssl-ssltest-output. "DSA Public Key"/exact
|
|
|
|
$ if $severity .eq. 1
|
|
|
|
$ then
|
|
|
|
$ dsa_cert := YES
|
|
|
|
$ else
|
|
|
|
$ dsa_cert := NO
|
|
|
|
$ endif
|
|
|
|
$ set on
|
|
|
|
$ delete testssl-ssltest-output.;*
|
|
|
|
$
|
|
|
|
$ if p3 .eqs. ""
|
|
|
|
$ then
|
|
|
|
$ copy/concatenate [-.certs]*.pem certs.tmp
|
|
|
|
$ CA = """-CAfile"" certs.tmp"
|
|
|
|
$ else
|
|
|
|
$ CA = """-CAfile"" "+p3
|
|
|
|
$ endif
|
|
|
|
$
|
|
|
|
$!###########################################################################
|
1999-05-13 11:37:32 +00:00
|
|
|
$
|
|
|
|
$ write sys$output "test sslv2"
|
2000-03-13 22:27:52 +00:00
|
|
|
$ 'ssltest' -ssl2
|
1999-05-13 11:37:32 +00:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
|
|
|
$ write sys$output "test sslv2 with server authentication"
|
2000-03-13 22:27:52 +00:00
|
|
|
$ 'ssltest' -ssl2 -server_auth 'CA'
|
1999-05-13 11:37:32 +00:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
2000-03-13 22:27:52 +00:00
|
|
|
$ if .not. dsa_cert
|
|
|
|
$ then
|
|
|
|
$ write sys$output "test sslv2 with client authentication"
|
|
|
|
$ 'ssltest' -ssl2 -client_auth 'CA'
|
|
|
|
$ if $severity .ne. 1 then goto exit3
|
1999-05-13 11:37:32 +00:00
|
|
|
$
|
2000-03-13 22:27:52 +00:00
|
|
|
$ write sys$output "test sslv2 with both client and server authentication"
|
|
|
|
$ 'ssltest' -ssl2 -server_auth -client_auth 'CA'
|
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$ endif
|
1999-05-13 11:37:32 +00:00
|
|
|
$
|
|
|
|
$ write sys$output "test sslv3"
|
2000-03-13 22:27:52 +00:00
|
|
|
$ 'ssltest' -ssl3
|
1999-05-13 11:37:32 +00:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
|
|
|
$ write sys$output "test sslv3 with server authentication"
|
2000-03-13 22:27:52 +00:00
|
|
|
$ 'ssltest' -ssl3 -server_auth 'CA'
|
1999-05-13 11:37:32 +00:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
|
|
|
$ write sys$output "test sslv3 with client authentication"
|
2000-03-13 22:27:52 +00:00
|
|
|
$ 'ssltest' -ssl3 -client_auth 'CA'
|
1999-05-13 11:37:32 +00:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
|
|
|
$ write sys$output "test sslv3 with both client and server authentication"
|
2000-03-13 22:27:52 +00:00
|
|
|
$ 'ssltest' -ssl3 -server_auth -client_auth 'CA'
|
1999-05-13 11:37:32 +00:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
|
|
|
$ write sys$output "test sslv2/sslv3"
|
2000-03-13 22:27:52 +00:00
|
|
|
$ 'ssltest'
|
1999-05-13 11:37:32 +00:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
|
|
|
$ write sys$output "test sslv2/sslv3 with server authentication"
|
2000-03-13 22:27:52 +00:00
|
|
|
$ 'ssltest' -server_auth 'CA'
|
1999-05-13 11:37:32 +00:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
|
|
|
$ write sys$output "test sslv2/sslv3 with client authentication"
|
2000-03-13 22:27:52 +00:00
|
|
|
$ 'ssltest' -client_auth 'CA'
|
1999-05-13 11:37:32 +00:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
|
|
|
$ write sys$output "test sslv2/sslv3 with both client and server authentication"
|
2000-03-13 22:27:52 +00:00
|
|
|
$ 'ssltest' -server_auth -client_auth 'CA'
|
1999-05-13 11:37:32 +00:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
1999-07-28 23:25:59 +00:00
|
|
|
$ write sys$output "test sslv2 via BIO pair"
|
2000-03-13 22:27:52 +00:00
|
|
|
$ 'ssltest' -bio_pair -ssl2
|
2000-01-30 13:44:08 +00:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
1999-07-28 23:25:59 +00:00
|
|
|
$ write sys$output "test sslv2 with server authentication via BIO pair"
|
2000-03-13 22:27:52 +00:00
|
|
|
$ 'ssltest' -bio_pair -ssl2 -server_auth 'CA'
|
1999-07-28 23:25:59 +00:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
2000-03-13 22:27:52 +00:00
|
|
|
$ if .not. dsa_cert
|
|
|
|
$ then
|
|
|
|
$ write sys$output "test sslv2 with client authentication via BIO pair"
|
|
|
|
$ 'ssltest' -bio_pair -ssl2 -client_auth 'CA'
|
|
|
|
$ if $severity .ne. 1 then goto exit3
|
1999-07-28 23:25:59 +00:00
|
|
|
$
|
2000-03-13 22:27:52 +00:00
|
|
|
$ write sys$output "test sslv2 with both client and server authentication via BIO pair"
|
|
|
|
$ 'ssltest' -bio_pair -ssl2 -server_auth -client_auth 'CA'
|
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$ endif
|
1999-07-28 23:25:59 +00:00
|
|
|
$
|
|
|
|
$ write sys$output "test sslv3 via BIO pair"
|
2000-03-13 22:27:52 +00:00
|
|
|
$ 'ssltest' -bio_pair -ssl3
|
1999-07-28 23:25:59 +00:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
|
|
|
$ write sys$output "test sslv3 with server authentication via BIO pair"
|
2000-03-13 22:27:52 +00:00
|
|
|
$ 'ssltest' -bio_pair -ssl3 -server_auth 'CA'
|
1999-07-28 23:25:59 +00:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
|
|
|
$ write sys$output "test sslv3 with client authentication via BIO pair"
|
2000-03-13 22:27:52 +00:00
|
|
|
$ 'ssltest' -bio_pair -ssl3 -client_auth 'CA'
|
1999-07-28 23:25:59 +00:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
|
|
|
|
$ write sys$output "test sslv3 with both client and server authentication via BIO pair"
|
2000-03-13 22:27:52 +00:00
|
|
|
$ 'ssltest' -bio_pair -ssl3 -server_auth -client_auth 'CA'
|
1999-07-28 23:25:59 +00:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
|
|
|
$ write sys$output "test sslv2/sslv3 via BIO pair"
|
2000-03-13 22:27:52 +00:00
|
|
|
$ 'ssltest'
|
1999-07-28 23:25:59 +00:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
2000-03-13 22:27:52 +00: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 01:43:55 +00:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
1999-07-28 23:25:59 +00:00
|
|
|
$ write sys$output "test sslv2/sslv3 with server authentication"
|
2000-03-13 22:27:52 +00:00
|
|
|
$ 'ssltest' -bio_pair -server_auth 'CA'
|
1999-07-28 23:25:59 +00:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
|
|
|
$ write sys$output "test sslv2/sslv3 with client authentication via BIO pair"
|
2000-03-13 22:27:52 +00:00
|
|
|
$ 'ssltest' -bio_pair -client_auth 'CA'
|
1999-07-28 23:25:59 +00: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-13 22:27:52 +00:00
|
|
|
$ 'ssltest' -bio_pair -server_auth -client_auth 'CA'
|
1999-07-28 23:25:59 +00:00
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
2000-03-13 22:27:52 +00:00
|
|
|
$!###########################################################################
|
|
|
|
$
|
2000-03-13 23:06:03 +00:00
|
|
|
$ write sys$output "test tls1 with 1024bit anonymous DH, multiple handshakes"
|
2000-03-13 22:27:52 +00:00
|
|
|
$ 'ssltest' -v -bio_pair -tls1 -cipher "ADH" -dhe1024dsa -num 10 -f -time
|
|
|
|
$ if $severity .ne. 1 then goto exit3
|
|
|
|
$
|
|
|
|
$ set noon
|
|
|
|
$ define/user sys$output nla0:
|
|
|
|
$ mcr 'exe_dir'openssl no-rsa
|
|
|
|
$ save_severity=$SEVERITY
|
|
|
|
$ set on
|
|
|
|
$ if save_severity
|
|
|
|
$ 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
|
|
|
|
$
|
|
|
|
$ 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
|
|
|
|
$
|
1999-05-13 11:37:32 +00:00
|
|
|
$ RET = 1
|
|
|
|
$ goto exit
|
|
|
|
$ exit3:
|
|
|
|
$ RET = 3
|
|
|
|
$ exit:
|
|
|
|
$ delete certs.tmp;*
|
|
|
|
$ exit 'RET'
|