3 # Copyright (C) 2010-2012 Free Software Foundation, Inc.
5 # Author: Nikos Mavrogiannopoulos
7 # This file is part of GnuTLS.
9 # GnuTLS is free software; you can redistribute it and/or modify it
10 # under the terms of the GNU General Public License as published by the
11 # Free Software Foundation; either version 3 of the License, or (at
12 # your option) any later version.
14 # GnuTLS is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 # General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with GnuTLS; if not, write to the Free Software Foundation,
21 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 CLI
="${CLI:-../../src/gnutls-cli$EXEEXT}"
28 if test "${WINDIR}" != "";then
32 .
$srcdir/..
/scripts
/common.sh
37 echo "Compatibility checks using "`$SERV version`
38 $SERV version|
grep -e 1\
.0 >/dev
/null
2>&1
41 echo "OpenSSL 1.0.0 is required for ECDH and DTLS tests"
45 $SERV version|
grep -e 1\
.0\
.1 >/dev
/null
2>&1
48 DSA_CERT
=$srcdir/..
/dsa
/cert.dsa
.1024.pem
49 DSA_KEY
=$srcdir/..
/dsa
/dsa
.1024.pem
51 RSA_CERT
=$srcdir/..
/certs
/cert-rsa-2432.pem
52 RSA_KEY
=$srcdir/..
/certs
/rsa-2432.pem
54 CA_CERT
=$srcdir/..
/..
/doc
/credentials
/x509
/ca.pem
55 CLI_CERT
=$srcdir/..
/..
/doc
/credentials
/x509
/clicert.pem
56 CLI_KEY
=$srcdir/..
/..
/doc
/credentials
/x509
/clikey.pem
58 CA_ECC_CERT
=$srcdir/..
/certs
/ca-cert-ecc.pem
59 ECC224_CERT
=$srcdir/..
/certs
/cert-ecc.pem
60 ECC224_KEY
=$srcdir/..
/certs
/ecc.pem
62 ECC256_CERT
=$srcdir/..
/certs
/cert-ecc256.pem
63 ECC256_KEY
=$srcdir/..
/certs
/ecc256.pem
65 ECC521_CERT
=$srcdir/..
/certs
/cert-ecc521.pem
66 ECC521_KEY
=$srcdir/..
/certs
/ecc521.pem
68 ECC384_CERT
=$srcdir/..
/certs
/cert-ecc384.pem
69 ECC384_KEY
=$srcdir/..
/certs
/ecc384.pem
71 SERV_CERT
=$srcdir/..
/..
/doc
/credentials
/x509
/cert-rsa.pem
72 SERV_KEY
=$srcdir/..
/..
/doc
/credentials
/x509
/key-rsa.pem
73 SERV_DSA_CERT
=$srcdir/..
/..
/doc
/credentials
/x509
/cert-dsa.pem
74 SERV_DSA_KEY
=$srcdir/..
/..
/doc
/credentials
/x509
/key-dsa.pem
76 echo "#####################"
77 echo "# Client mode tests #"
78 echo "#####################"
81 launch_bare_server $$ s_server
-quiet -www -accept $PORT -keyform pem
-certform pem
-ssl3 -dhparam params.dh
-key $RSA_KEY -cert $RSA_CERT -dkey $DSA_KEY -dcert $DSA_CERT -Verify 1 -CAfile $CA_CERT &
85 # Test SSL 3.0 with RSA ciphersuite
86 echo "Checking SSL 3.0 with RSA..."
87 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-SSL3.0:+RSA" --insecure --x509certfile $CLI_CERT --x509keyfile $CLI_KEY </dev
/null
>/dev
/null || \
90 # Test SSL 3.0 with DHE-RSA ciphersuite
91 echo "Checking SSL 3.0 with DHE-RSA..."
92 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-SSL3.0:+DHE-RSA" --insecure --x509certfile $CLI_CERT --x509keyfile $CLI_KEY </dev
/null
>/dev
/null || \
95 # Test SSL 3.0 with DHE-DSS ciphersuite
96 echo "Checking SSL 3.0 with DHE-DSS..."
97 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-SSL3.0:+DHE-DSS" --insecure --x509certfile $CLI_CERT --x509keyfile $CLI_KEY </dev
/null
>/dev
/null || \
104 launch_bare_server $$ s_server
-cipher NULL
-quiet -www -accept $PORT -keyform pem
-certform pem
-tls1 -dhparam params.dh
-key $RSA_KEY -cert $RSA_CERT -Verify 1 -CAfile $CA_CERT &
108 # Test TLS 1.0 with RSA-NULL ciphersuite
109 echo "Checking TLS 1.0 with RSA-NULL..."
110 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+NULL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.0:+RSA" --insecure --x509certfile $CLI_CERT --x509keyfile $CLI_KEY </dev
/null
>/dev
/null || \
116 #-cipher RSA-AES128-SHA:DHE-DSS-AES128-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-AES128-SHA
117 launch_bare_server $$ s_server
-quiet -www -accept $PORT -keyform pem
-certform pem
-tls1 -dhparam params.dh
-key $RSA_KEY -cert $RSA_CERT -dkey $DSA_KEY -dcert $DSA_CERT -Verify 1 -CAfile $CA_CERT &
121 # Test TLS 1.0 with RSA ciphersuite
122 echo "Checking TLS 1.0 with RSA..."
123 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.0:+RSA" --insecure --x509certfile $CLI_CERT --x509keyfile $CLI_KEY </dev
/null
>/dev
/null || \
126 # Test TLS 1.0 with DHE-RSA ciphersuite
127 echo "Checking TLS 1.0 with DHE-RSA..."
128 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.0:+DHE-RSA" --insecure --x509certfile $CLI_CERT --x509keyfile $CLI_KEY </dev
/null
>/dev
/null || \
131 # Test TLS 1.0 with DHE-RSA ciphersuite
132 echo "Checking TLS 1.0 with ECDHE-RSA..."
133 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.0:+ECDHE-RSA:+CURVE-ALL" --insecure --x509certfile $CLI_CERT --x509keyfile $CLI_KEY </dev
/null
>/dev
/null || \
136 # Test TLS 1.0 with DHE-DSS ciphersuite
137 echo "Checking TLS 1.0 with DHE-DSS..."
138 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.0:+DHE-DSS" --insecure --x509certfile $CLI_CERT --x509keyfile $CLI_KEY </dev
/null
>/dev
/null || \
144 #-cipher ECDHE-ECDSA-AES128-SHA
145 launch_bare_server $$ s_server
-quiet -www -accept $PORT -keyform pem
-certform pem
-tls1 -key $ECC224_KEY -cert $ECC224_CERT -Verify 1 -named_curve secp224r1
-CAfile $CA_ECC_CERT &
149 # Test TLS 1.0 with ECDHE-ECDSA ciphersuite
150 echo "Checking TLS 1.0 with ECDHE-ECDSA (SECP224R1)..."
151 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.0:+ECDHE-ECDSA:+CURVE-ALL" --insecure --x509certfile $ECC224_CERT --x509keyfile $ECC224_KEY </dev
/null
>/dev
/null || \
157 #-cipher ECDHE-ECDSA-AES128-SHA
158 launch_bare_server $$ s_server
-quiet -www -accept $PORT -keyform pem
-certform pem
-tls1 -key $ECC384_KEY -cert $ECC384_CERT -Verify 1 -named_curve secp384r1
-CAfile $CA_ECC_CERT &
162 # Test TLS 1.0 with ECDHE-ECDSA ciphersuite
163 echo "Checking TLS 1.0 with ECDHE-ECDSA (SECP384R1)..."
164 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.0:+ECDHE-ECDSA:+CURVE-ALL" --insecure --x509certfile $ECC384_CERT --x509keyfile $ECC384_KEY </dev
/null
>/dev
/null || \
170 #-cipher ECDHE-ECDSA-AES128-SHA
171 launch_bare_server $$ s_server
-quiet -www -accept $PORT -keyform pem
-certform pem
-tls1 -key $ECC521_KEY -cert $ECC521_CERT -Verify 1 -named_curve secp521r1
-CAfile $CA_ECC_CERT &
175 # Test TLS 1.0 with ECDHE-ECDSA ciphersuite
176 echo "Checking TLS 1.0 with ECDHE-ECDSA (SECP521R1)..."
177 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.0:+ECDHE-ECDSA:+CURVE-ALL" --insecure --x509certfile $ECC521_CERT --x509keyfile $ECC521_KEY </dev
/null
>/dev
/null || \
184 if test $SV2 = 0;then
185 # Tests requiring openssl 1.0.1 - TLS 1.2
186 #-cipher RSA-AES128-SHA:DHE-DSS-AES128-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-AES128-SHA
187 launch_bare_server $$ s_server
-quiet -www -accept $PORT -keyform pem
-certform pem
-tls1_2 -dhparam params.dh
-key $RSA_KEY -cert $RSA_CERT -dkey $DSA_KEY -dcert $DSA_CERT -Verify 1 -CAfile $CA_CERT &
191 echo "Checking TLS 1.2 with RSA..."
192 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.2:+RSA" --insecure --x509certfile $CLI_CERT --x509keyfile $CLI_KEY </dev
/null
>/dev
/null || \
195 echo "Checking TLS 1.2 with DHE-RSA..."
196 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.2:+DHE-RSA" --insecure --x509certfile $CLI_CERT --x509keyfile $CLI_KEY </dev
/null
>/dev
/null || \
199 echo "Checking TLS 1.2 with ECDHE-RSA..."
200 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.2:+ECDHE-RSA:+CURVE-ALL" --insecure --x509certfile $CLI_CERT --x509keyfile $CLI_KEY </dev
/null
>/dev
/null || \
203 echo "Checking TLS 1.2 with DHE-DSS..."
204 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.2:+DHE-DSS" --insecure --x509certfile $CLI_CERT --x509keyfile $CLI_KEY </dev
/null
>/dev
/null || \
210 #-cipher ECDHE-ECDSA-AES128-SHA
211 launch_bare_server $$ s_server
-quiet -www -accept $PORT -keyform pem
-certform pem
-tls1_2 -key $ECC224_KEY -cert $ECC224_CERT -Verify 1 -named_curve secp224r1
-CAfile $CA_ECC_CERT &
215 echo "Checking TLS 1.2 with ECDHE-ECDSA... (SECP224R1)"
216 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.2:+ECDHE-ECDSA:+CURVE-ALL" --insecure --x509certfile $ECC224_CERT --x509keyfile $ECC224_KEY </dev
/null
>/dev
/null || \
222 #-cipher ECDHE-ECDSA-AES128-SHA
223 launch_bare_server $$ s_server
-quiet -www -accept $PORT -keyform pem
-certform pem
-tls1_2 -key $ECC384_KEY -cert $ECC384_CERT -Verify 1 -named_curve secp384r1
-CAfile $CA_ECC_CERT &
227 echo "Checking TLS 1.2 with ECDHE-ECDSA... (SECP384R1)"
228 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.2:+ECDHE-ECDSA:+CURVE-ALL" --insecure --x509certfile $ECC384_CERT --x509keyfile $ECC384_KEY </dev
/null
>/dev
/null || \
234 #-cipher ECDHE-ECDSA-AES128-SHA
235 launch_bare_server $$ s_server
-quiet -www -accept $PORT -keyform pem
-certform pem
-tls1_2 -key $ECC521_KEY -cert $ECC521_CERT -Verify 1 -named_curve secp521r1
-CAfile $CA_ECC_CERT &
239 echo "Checking TLS 1.2 with ECDHE-ECDSA... (SECP521R1)"
240 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.2:+ECDHE-ECDSA:+CURVE-ALL" --insecure --x509certfile $ECC521_CERT --x509keyfile $ECC521_KEY </dev
/null
>/dev
/null || \
248 launch_bare_server $$ s_server
-quiet -accept $PORT -keyform pem
-certform pem
-dtls1 -timeout -dhparam params.dh
-key $RSA_KEY -cert $RSA_CERT -dkey $DSA_KEY -dcert $DSA_CERT -Verify 1 -CAfile $CA_CERT &
252 # Test DTLS 1.0 with RSA ciphersuite
253 echo "Checking DTLS 1.0 with RSA..."
254 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-DTLS1.0:+RSA" --udp --insecure --x509certfile $CLI_CERT --x509keyfile $CLI_KEY </dev
/null
>/dev
/null || \
260 launch_bare_server $$ s_server
-quiet -accept $PORT -keyform pem
-certform pem
-dtls1 -timeout -dhparam params.dh
-key $RSA_KEY -cert $RSA_CERT -dkey $DSA_KEY -dcert $DSA_CERT -Verify 1 -CAfile $CA_CERT &
264 # Test DTLS 1.0 with DHE-RSA ciphersuite
265 echo "Checking DTLS 1.0 with DHE-RSA..."
266 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-DTLS1.0:+DHE-RSA" --udp --insecure --x509certfile $CLI_CERT --x509keyfile $CLI_KEY </dev
/null
>/dev
/null || \
272 launch_bare_server $$ s_server
-quiet -accept $PORT -keyform pem
-certform pem
-dtls1 -timeout -dhparam params.dh
-key $RSA_KEY -cert $RSA_CERT -dkey $DSA_KEY -dcert $DSA_CERT -Verify 1 -CAfile $CA_CERT &
276 # Test DTLS 1.0 with DHE-DSS ciphersuite
277 echo "Checking DTLS 1.0 with DHE-DSS..."
278 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-DTLS1.0:+DHE-DSS" --udp --insecure --x509certfile $CLI_CERT --x509keyfile $CLI_KEY </dev
/null
>/dev
/null || \
286 echo "Client mode tests were successfully completed"
288 echo "#####################"
289 echo "# Server mode tests #"
290 echo "#####################"
291 SERV
="../../src/gnutls-serv$EXEEXT -q"
294 # Note that openssl s_client does not return error code on failure
296 echo "Check SSL 3.0 with RSA ciphersuite"
297 launch_server $$
--priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-SSL3.0:+RSA" --x509certfile $SERV_CERT --x509keyfile $SERV_KEY --x509cafile $CA_CERT --dhparams params.dh
& PID
=$
!
300 $OPENSSL_CLI s_client
-host localhost
-port $PORT -ssl3 -cert $CLI_CERT -key $CLI_KEY -CAfile $CA_CERT </dev
/null
2>&1 |
grep "\:error\:" && \
306 echo "Check SSL 3.0 with DHE-RSA ciphersuite"
307 launch_server $$
--priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-SSL3.0:+DHE-RSA" --x509certfile $SERV_CERT --x509keyfile $SERV_KEY --x509cafile $CA_CERT --dhparams params.dh
& PID
=$
!
310 $OPENSSL_CLI s_client
-host localhost
-port $PORT -ssl3 -cert $CLI_CERT -key $CLI_KEY -CAfile $CA_CERT </dev
/null
2>&1 |
grep "\:error\:" && \
316 echo "Check SSL 3.0 with DHE-DSS ciphersuite"
317 launch_server $$
--priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-SSL3.0:+DHE-DSS" --x509certfile $SERV_DSA_CERT --x509keyfile $SERV_DSA_KEY --dhparams params.dh
& PID
=$
!
320 $OPENSSL_CLI s_client
-host localhost
-port $PORT -ssl3 -cert $CLI_CERT -key $CLI_KEY -CAfile $CA_CERT </dev
/null
2>&1 |
grep "\:error\:" && \
328 # This test was disabled because it doesn't work as expected with openssl 1.0.0d
329 #echo "Check TLS 1.0 with RSA ciphersuite (SSLv2 hello)"
330 #launch_server $$ --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.0:+RSA" --x509certfile $SERV_CERT --x509keyfile $SERV_KEY --x509cafile $CA_CERT --dhparams params.dh & PID=$!
333 #$OPENSSL_CLI s_client -host localhost -port $PORT -cert $CLI_CERT -key $CLI_KEY -CAfile $CA_CERT </dev/null 2>&1 | grep "\:error\:" && \
339 echo "Check TLS 1.0 with RSA-NULL ciphersuite"
340 launch_server $$
--priority "NONE:+NULL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.0:+RSA:+DHE-RSA" --x509certfile $SERV_CERT --x509keyfile $SERV_KEY --x509cafile $CA_CERT --dhparams params.dh
& PID
=$
!
343 $OPENSSL_CLI s_client
-cipher NULL-SHA
-host localhost
-tls1 -port $PORT -cert $CLI_CERT -key $CLI_KEY -CAfile $CA_CERT </dev
/null
2>&1 |
grep "\:error\:" && \
349 echo "Check TLS 1.0 with DHE-RSA ciphersuite"
350 launch_server $$
--priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.0:+DHE-RSA" --x509certfile $SERV_CERT --x509keyfile $SERV_KEY --x509cafile $CA_CERT --dhparams params.dh
& PID
=$
!
353 $OPENSSL_CLI s_client
-host localhost
-tls1 -port $PORT -cert $CLI_CERT -key $CLI_KEY -CAfile $CA_CERT </dev
/null
2>&1 |
grep "\:error\:" && \
359 echo "Check TLS 1.0 with DHE-DSS ciphersuite"
360 launch_server $$
--priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.0:+DHE-DSS" --x509certfile $SERV_DSA_CERT --x509keyfile $SERV_DSA_KEY --dhparams params.dh
& PID
=$
!
363 $OPENSSL_CLI s_client
-host localhost
-tls1 -port $PORT -cert $CLI_CERT -key $CLI_KEY -CAfile $CA_CERT </dev
/null
2>&1 |
grep "\:error\:" && \
369 echo "Check TLS 1.0 with ECDHE-RSA ciphersuite"
370 launch_server $$
--priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.0:+ECDHE-RSA:+CURVE-ALL" --x509certfile $SERV_CERT --x509keyfile $SERV_KEY --x509cafile $CA_CERT & PID
=$
!
373 #-cipher ECDHE-RSA-AES128-SHA
374 $OPENSSL_CLI s_client
-host localhost
-tls1 -port $PORT -cert $CLI_CERT -key $CLI_KEY -CAfile $CA_CERT </dev
/null
2>&1 |
grep "\:error\:" && \
380 echo "Check TLS 1.0 with ECDHE-ECDSA ciphersuite (SECP224R1)"
381 launch_server $$
--priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.0:+ECDHE-ECDSA:+CURVE-ALL" --x509certfile $ECC224_CERT --x509keyfile $ECC224_KEY --x509cafile $CA_ECC_CERT & PID
=$
!
384 #-cipher ECDHE-ECDSA-AES128-SHA
385 $OPENSSL_CLI s_client
-host localhost
-tls1 -port $PORT -cert $ECC224_CERT -key $ECC224_KEY -CAfile $CA_ECC_CERT </dev
/null
2>&1 |
grep "\:error\:" && \
391 echo "Check TLS 1.0 with ECDHE-ECDSA ciphersuite (SECP256R1)"
392 launch_server $$
--priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.0:+ECDHE-ECDSA:+CURVE-ALL" --x509certfile $ECC256_CERT --x509keyfile $ECC256_KEY --x509cafile $CA_ECC_CERT & PID
=$
!
395 #-cipher ECDHE-ECDSA-AES128-SHA
396 $OPENSSL_CLI s_client
-host localhost
-tls1 -port $PORT -cert $ECC256_CERT -key $ECC256_KEY -CAfile $CA_ECC_CERT </dev
/null
2>&1 |
grep "\:error\:" && \
402 echo "Check TLS 1.0 with ECDHE-ECDSA ciphersuite (SECP384R1)"
403 launch_server $$
--priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.0:+ECDHE-ECDSA:+CURVE-ALL" --x509certfile $ECC384_CERT --x509keyfile $ECC384_KEY --x509cafile $CA_ECC_CERT & PID
=$
!
406 #-cipher ECDHE-ECDSA-AES128-SHA
407 $OPENSSL_CLI s_client
-host localhost
-tls1 -port $PORT -cert $ECC384_CERT -key $ECC384_KEY -CAfile $CA_ECC_CERT </dev
/null
2>&1 |
grep "\:error\:" && \
413 echo "Check TLS 1.0 with ECDHE-ECDSA ciphersuite (SECP521R1)"
414 launch_server $$
--priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.0:+ECDHE-ECDSA:+CURVE-ALL" --x509certfile $ECC521_CERT --x509keyfile $ECC521_KEY --x509cafile $CA_ECC_CERT & PID
=$
!
417 #-cipher ECDHE-ECDSA-AES128-SHA
418 $OPENSSL_CLI s_client
-host localhost
-tls1 -port $PORT -cert $ECC521_CERT -key $ECC521_KEY -CAfile $CA_ECC_CERT </dev
/null
2>&1 |
grep "\:error\:" && \
424 if test $SV2 = 0;then
426 echo "Check TLS 1.2 with DHE-RSA ciphersuite"
427 launch_server $$
--priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.2:+DHE-RSA" --x509certfile $SERV_CERT --x509keyfile $SERV_KEY --x509cafile $CA_CERT --dhparams params.dh
& PID
=$
!
430 $OPENSSL_CLI s_client
-host localhost
-tls1_2 -port $PORT -cert $CLI_CERT -key $CLI_KEY -CAfile $CA_CERT </dev
/null
2>&1 |
grep "\:error\:" && \
436 echo "Check TLS 1.2 with DHE-DSS ciphersuite"
437 launch_server $$
--priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.2:+DHE-DSS" --x509certfile $SERV_DSA_CERT --x509keyfile $SERV_DSA_KEY --dhparams params.dh
& PID
=$
!
440 $OPENSSL_CLI s_client
-host localhost
-tls1_2 -port $PORT -cert $CLI_CERT -key $CLI_KEY -CAfile $CA_CERT </dev
/null
2>&1 |
grep "\:error\:" && \
446 echo "Check TLS 1.2 with ECDHE-RSA ciphersuite"
447 launch_server $$
--priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.2:+ECDHE-RSA:+CURVE-ALL" --x509certfile $SERV_CERT --x509keyfile $SERV_KEY --x509cafile $CA_CERT & PID
=$
!
450 #-cipher ECDHE-RSA-AES128-SHA
451 $OPENSSL_CLI s_client
-host localhost
-tls1_2 -port $PORT -cert $CLI_CERT -key $CLI_KEY -CAfile $CA_CERT </dev
/null
2>&1 |
grep "\:error\:" && \
457 echo "Check TLS 1.2 with ECDHE-ECDSA ciphersuite (SECP224R1)"
458 launch_server $$
--priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.2:+ECDHE-ECDSA:+CURVE-ALL" --x509certfile $ECC224_CERT --x509keyfile $ECC224_KEY --x509cafile $CA_ECC_CERT & PID
=$
!
461 #-cipher ECDHE-ECDSA-AES128-SHA
462 $OPENSSL_CLI s_client
-host localhost
-tls1_2 -port $PORT -cert $ECC224_CERT -key $ECC224_KEY -CAfile $CA_ECC_CERT </dev
/null
2>&1 |
grep "\:error\:" && \
468 echo "Check TLS 1.2 with ECDHE-ECDSA ciphersuite (SECP256R1)"
469 launch_server $$
--priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.2:+ECDHE-ECDSA:+CURVE-ALL" --x509certfile $ECC256_CERT --x509keyfile $ECC256_KEY --x509cafile $CA_ECC_CERT & PID
=$
!
472 #-cipher ECDHE-ECDSA-AES128-SHA
473 $OPENSSL_CLI s_client
-host localhost
-tls1_2 -port $PORT -cert $ECC256_CERT -key $ECC256_KEY -CAfile $CA_ECC_CERT </dev
/null
2>&1 |
grep "\:error\:" && \
479 echo "Check TLS 1.2 with ECDHE-ECDSA ciphersuite (SECP384R1)"
480 launch_server $$
--priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.2:+ECDHE-ECDSA:+CURVE-ALL" --x509certfile $ECC384_CERT --x509keyfile $ECC384_KEY --x509cafile $CA_ECC_CERT & PID
=$
!
483 #-cipher ECDHE-ECDSA-AES128-SHA
484 $OPENSSL_CLI s_client
-host localhost
-tls1_2 -port $PORT -cert $ECC384_CERT -key $ECC384_KEY -CAfile $CA_ECC_CERT </dev
/null
2>&1 |
grep "\:error\:" && \
490 echo "Check TLS 1.2 with ECDHE-ECDSA ciphersuite (SECP521R1)"
491 launch_server $$
--priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.2:+ECDHE-ECDSA:+CURVE-ALL" --x509certfile $ECC521_CERT --x509keyfile $ECC521_KEY --x509cafile $CA_ECC_CERT & PID
=$
!
494 #-cipher ECDHE-ECDSA-AES128-SHA
495 $OPENSSL_CLI s_client
-host localhost
-tls1_2 -port $PORT -cert $ECC521_CERT -key $ECC521_KEY -CAfile $CA_ECC_CERT </dev
/null
2>&1 |
grep "\:error\:" && \
505 echo "Check DTLS 1.0 with RSA ciphersuite"
506 launch_server $$
--priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-DTLS1.0:+RSA" --udp --x509certfile $SERV_CERT --x509keyfile $SERV_KEY --x509cafile $CA_CERT --dhparams params.dh
& PID
=$
!
509 $OPENSSL_CLI s_client
-host localhost
-port $PORT -dtls1 -cert $CLI_CERT -key $CLI_KEY -CAfile $CA_CERT </dev
/null
2>&1 |
grep "\:error\:" && \
515 echo "Check DTLS 1.0 with DHE-RSA ciphersuite"
516 launch_server $$
--priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-DTLS1.0:+DHE-RSA" --udp --x509certfile $SERV_CERT --x509keyfile $SERV_KEY --x509cafile $CA_CERT --dhparams params.dh
& PID
=$
!
519 $CLI s_client
-host localhost
-port $PORT -dtls1 -cert $CLI_CERT -key $CLI_KEY -CAfile $CA_CERT </dev
/null
2>&1 |
grep "\:error\:" && \
525 echo "Check DTLS 1.0 with DHE-DSS ciphersuite"
526 launch_server $$
--priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-DTLS1.0:+DHE-DSS" --udp --x509certfile $SERV_DSA_CERT --x509keyfile $SERV_DSA_KEY --dhparams params.dh
& PID
=$
!
529 $CLI s_client
-host localhost
-port $PORT -dtls1 -cert $CLI_CERT -key $CLI_KEY -CAfile $CA_CERT </dev
/null
2>&1 |
grep "\:error\:" && \