-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·51 lines (44 loc) · 1.16 KB
/
test.sh
File metadata and controls
executable file
·51 lines (44 loc) · 1.16 KB
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
#! /usr/bin/env bash
URL=https://ipv4.icanhazip.com
echo -e "\n******\n"
echo "This should fail - no client cert spec'd -- https"
echo "curl ${URL}"
curl \
--proxy https://localhost:8080 \
--proxy-cacert ca.crt \
${URL}
echo -e "\n******\n"
echo "This should fail; no client private key spec'd -- https"
echo "curl ${URL}"
curl \
--proxy https://localhost:8080 \
--proxy-cacert ca.crt \
--proxy-cert client.crt \
${URL}
echo -e "\n******\n"
echo "This should pass; client cert and key in separate files -- https"
echo "curl ${URL}"
curl \
--proxy https://localhost:8080 \
--proxy-cacert ca.crt \
--proxy-cert client.crt \
--proxy-key client.key \
${URL}
echo -e "\n******\n"
echo "This should pass; combined client cert and key -- https"
echo "curl ${URL}"
curl \
--proxy https://localhost:8080 \
--proxy-cacert ca.crt \
--proxy-cert client.pem \
${URL}
echo -e "\n******\n"
URL=http://ipv4.icanhazip.com
echo "This should pass; combined client cert and key -- http"
echo "curl ${URL}"
curl \
--proxy https://localhost:8080 \
--proxy-cacert ca.crt \
--proxy-cert client.pem \
${URL}
echo -e "\n******\n"