]> git.saurik.com Git - apple/security.git/blob - SecurityTests/PreSecurityTests.sh
Security-57336.1.9.tar.gz
[apple/security.git] / SecurityTests / PreSecurityTests.sh
1 #!/bin/sh
2
3 # PreSecurityTest.sh
4 # Security
5 #
6 # Created by Fabrice Gautier on 6/7/11.
7 # Copyright 2011 Apple, Inc. All rights reserved.
8
9 echo "PreSecuritTests.sh: pre-run script"
10
11 # Use this for macport install of gnutls:
12 #GNUTLS_DIR=/opt/local
13
14 # Use this if you compiled your own gnutls:
15 GNUTLS_DIR=/usr/local
16
17 # System openssl
18 #OPENSSL_DIR=/usr
19
20 # Macport openssl
21 OPENSSL_DIR=/opt/local
22
23 # your own openssl
24 #OPENSSL_DIR=/usr/local
25
26
27 echo "Starting servers"
28
29 echo "openssl s_server RSA/RSA..."
30 ${OPENSSL_DIR}/bin/openssl s_server -accept 4445 -state -key test-certs/ServerKey.rsa.pem -cert test-certs/ServerCert.rsa.rsa.pem -www -cipher ALL:eNULL > /tmp/s_server.rsa.rsa.log 2>&1 &
31
32 echo "openssl s_server RSA/ECC..."
33 ${OPENSSL_DIR}/bin/openssl s_server -accept 4446 -state -key test-certs/ServerKey.rsa.pem -cert test-certs/ServerCert.rsa.ecc.pem -www -cipher ALL:eNULL > /tmp/s_server.rsa.ecc.log 2>&1 &
34
35 echo "openssl s_server ECC/RSA..."
36 ${OPENSSL_DIR}/bin/openssl s_server -accept 4447 -state -key test-certs/ServerKey.ecc.pem -cert test-certs/ServerCert.ecc.rsa.pem -www -cipher ALL:eNULL > /tmp/s_server.ecc.rsa.log 2>&1 &
37
38 echo "openssl s_server ECC/ECC..."
39 ${OPENSSL_DIR}/bin/openssl s_server -accept 4448 -state -key test-certs/ServerKey.ecc.pem -cert test-certs/ServerCert.ecc.ecc.pem -www -cipher ALL:eNULL > /tmp/s_server.ecc.ecc.log 2>&1 &
40
41 echo "gnutls-serv RSA/RSA..."
42 ${GNUTLS_DIR}/bin/gnutls-serv -p 5556 -d 4 --http --x509keyfile test-certs/ServerKey.rsa.pem --x509certfile test-certs/ServerCert.rsa.rsa.pem --priority "NORMAL:+ANON-DH:+NULL" > /tmp/gnutls-serv.rsa.rsa.log 2>&1 &
43
44 echo "gnutls-serv RSA/ECC..."
45 ${GNUTLS_DIR}/bin/gnutls-serv -p 5557 -d 4 --http --x509keyfile test-certs/ServerKey.rsa.pem --x509certfile test-certs/ServerCert.rsa.ecc.pem --priority "NORMAL:+ANON-DH:+NULL" > /tmp/gnutls-serv.rsa.ecc.log 2>&1 &
46
47 echo "gnutls-serv ECC/RSA..."
48 ${GNUTLS_DIR}/bin/gnutls-serv -p 5558 -d 4 --http --x509keyfile test-certs/ServerKey.ecc.pem --x509certfile test-certs/ServerCert.ecc.rsa.pem --priority "NORMAL:+ANON-DH:+NULL" > /tmp/gnutls-serv.ecc.rsa.log 2>&1 &
49
50 echo "gnutls-serv ECC/ECC..."
51 ${GNUTLS_DIR}/bin/gnutls-serv -p 5559 -d 4 --http --x509keyfile test-certs/ServerKey.ecc.pem --x509certfile test-certs/ServerCert.ecc.ecc.pem --priority "NORMAL:+ANON-DH:+NULL" > /tmp/gnutls-serv.ecc.ecc.log 2>&1 &
52
53
54 echo "tcprelay..."
55 /usr/local/bin/tcprelay localhost:4445 localhost:4446 localhost:4447 localhost:4448 localhost:5556 localhost:5557 localhost:5558 localhost:5559 > tcprelay.log 2>&1 &
56 echo $! > /tmp/tcprelay.pid
57 cat /tmp/tcprelay.pid
58
59 echo "Logs in $DIR"