1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204
|
$! TESTSSL.COM
$
$ __arch := VAX
$ if f$getsyi("cpu") .ge. 128 then __arch := AXP
$ 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 testssl-x509-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-x509-output. "DSA Public Key"/exact
$ if $severity .eq. 1
$ then
$ dsa_cert := YES
$ else
$ dsa_cert := NO
$ endif
$ set on
$ delete testssl-x509-output.;*
$
$ if p3 .eqs. ""
$ then
$ copy/concatenate [-.certs]*.pem certs.tmp
$ CA = """-CAfile"" certs.tmp"
$ else
$ CA = """-CAfile"" "+p3
$ endif
$
$!###########################################################################
$
$ write sys$output "test sslv2"
$ 'ssltest' -ssl2
$ if $severity .ne. 1 then goto exit3
$
$ write sys$output "test sslv2 with server authentication"
$ 'ssltest' -ssl2 -server_auth 'CA'
$ if $severity .ne. 1 then goto exit3
$
$ 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
$
$ 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
$
$ write sys$output "test sslv3"
$ 'ssltest' -ssl3
$ if $severity .ne. 1 then goto exit3
$
$ write sys$output "test sslv3 with server authentication"
$ 'ssltest' -ssl3 -server_auth 'CA'
$ if $severity .ne. 1 then goto exit3
$
$ write sys$output "test sslv3 with client authentication"
$ 'ssltest' -ssl3 -client_auth 'CA'
$ if $severity .ne. 1 then goto exit3
$
$ write sys$output "test sslv3 with both client and server authentication"
$ 'ssltest' -ssl3 -server_auth -client_auth 'CA'
$ if $severity .ne. 1 then goto exit3
$
$ write sys$output "test sslv2/sslv3"
$ 'ssltest'
$ if $severity .ne. 1 then goto exit3
$
$ write sys$output "test sslv2/sslv3 with server authentication"
$ 'ssltest' -server_auth 'CA'
$ if $severity .ne. 1 then goto exit3
$
$ write sys$output "test sslv2/sslv3 with client authentication"
$ 'ssltest' -client_auth 'CA'
$ if $severity .ne. 1 then goto exit3
$
$ write sys$output "test sslv2/sslv3 with both client and server authentication"
$ 'ssltest' -server_auth -client_auth 'CA'
$ if $severity .ne. 1 then goto exit3
$
$ write sys$output "test sslv2 via BIO pair"
$ 'ssltest' -bio_pair -ssl2
$ if $severity .ne. 1 then goto exit3
$
$ write sys$output "test sslv2 with server authentication via BIO pair"
$ 'ssltest' -bio_pair -ssl2 -server_auth 'CA'
$ if $severity .ne. 1 then goto exit3
$
$ 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
$
$ 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
$
$ write sys$output "test sslv3 via BIO pair"
$ 'ssltest' -bio_pair -ssl3
$ if $severity .ne. 1 then goto exit3
$
$ write sys$output "test sslv3 with server authentication via BIO pair"
$ 'ssltest' -bio_pair -ssl3 -server_auth 'CA'
$ if $severity .ne. 1 then goto exit3
$
$ write sys$output "test sslv3 with client authentication via BIO pair"
$ 'ssltest' -bio_pair -ssl3 -client_auth 'CA'
$ if $severity .ne. 1 then goto exit3
$ write sys$output "test sslv3 with both client and server authentication via BIO pair"
$ 'ssltest' -bio_pair -ssl3 -server_auth -client_auth 'CA'
$ if $severity .ne. 1 then goto exit3
$
$ write sys$output "test sslv2/sslv3 via BIO pair"
$ 'ssltest'
$ if $severity .ne. 1 then goto exit3
$
$ 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
$ if $severity .ne. 1 then goto exit3
$
$ write sys$output "test sslv2/sslv3 with server authentication"
$ 'ssltest' -bio_pair -server_auth 'CA'
$ if $severity .ne. 1 then goto exit3
$
$ write sys$output "test sslv2/sslv3 with client authentication via BIO pair"
$ 'ssltest' -bio_pair -client_auth 'CA'
$ if $severity .ne. 1 then goto exit3
$
$ write sys$output "test sslv2/sslv3 with both client and server authentication via BIO pair"
$ 'ssltest' -bio_pair -server_auth -client_auth 'CA'
$ if $severity .ne. 1 then goto exit3
$
$!###########################################################################
$
$ set noon
$ define/user sys$output nla0:
$ mcr 'exe_dir'openssl no-rsa
$ no_rsa=$SEVERITY
$ define/user sys$output nla0:
$ mcr 'exe_dir'openssl no-dh
$ no_dh=$SEVERITY
$ set on
$
$ 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
$ 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
$
$ 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
$ endif
$
$ RET = 1
$ goto exit
$ exit3:
$ RET = 3
$ exit:
$ if p3 .eqs. "" then delete certs.tmp;*
$ exit 'RET'
|