Skip to content

Instantly share code, notes, and snippets.

@jassinm
Last active January 1, 2016 19:09
Show Gist options
  • Save jassinm/8188721 to your computer and use it in GitHub Desktop.
Save jassinm/8188721 to your computer and use it in GitHub Desktop.
server --
tls_connection.erl:375:Fatal error: unknow ca
==> firefox add exception
An error occurred during a connection to 171.138.2.2:8443. The key does not support the requested operation. (Error code: sec_error_invalid_key)
wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb
sudo apt-get udpate
sudo apt-get install erlang
sudo apt-get install openssl
sudo apt-get install git
git clone https://github.com/extend/cowboy.git
cd cowboy/examples/ssl_hello_world/
make
./_rel/bin/ssl_hello_world_example console
openssl s_client -connect localhost:8443 ⏎ ⬆ ✱ ◼
CONNECTED(00000003)
depth=1 /C=US/ST=Texas/O=Nine Nines/OU=Cowboy/CN=ROOT CA
verify error:num=19:self signed certificate in certificate chain
verify return:0
---
Certificate chain
0 s:/C=US/ST=Texas/O=Nine Nines/OU=Cowboy/CN=localhost
i:/C=US/ST=Texas/O=Nine Nines/OU=Cowboy/CN=ROOT CA
1 s:/C=US/ST=Texas/O=Nine Nines/OU=Cowboy/CN=ROOT CA
i:/C=US/ST=Texas/O=Nine Nines/OU=Cowboy/CN=ROOT CA
---
Server certificate
-----BEGIN CERTIFICATE-----
MIICpTCCAg6gAwIBAgIJAOvpU0y2e5J5MA0GCSqGSIb3DQEBBQUAMFUxCzAJBgNV
BAYTAlVTMQ4wDAYDVQQIDAVUZXhhczETMBEGA1UECgwKTmluZSBOaW5lczEPMA0G
A1UECwwGQ293Ym95MRAwDgYDVQQDDAdST09UIENBMB4XDTEzMDIyODA1MjMzNFoX
DTMzMDIyMzA1MjMzNFowVzELMAkGA1UEBhMCVVMxDjAMBgNVBAgMBVRleGFzMRMw
EQYDVQQKDApOaW5lIE5pbmVzMQ8wDQYDVQQLDAZDb3dib3kxEjAQBgNVBAMMCWxv
Y2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAzbW1GjECzHUc/WST
qLiAGqjCNccR5saVS+yoz2SPRhpoyf0/qBrX5BY0tzmgozoTiRfE4wCiVD99Cc+D
rp/FM49r4EpZdocIovprmOmv/gwkoj95zaA6PKNn1OdmDp2hwJsX2Zm3kpbGUZTx
jDkkccmgUb4EjL7qNHq7saQtivUCAwEAAaN7MHkwCQYDVR0TBAIwADAsBglghkgB
hvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0OBBYE
FB6jTEIWI8T1ckORA4GezbyYxtbvMB8GA1UdIwQYMBaAFEp9nwoXaOUsEOY0voi4
S4ZjSl1vMA0GCSqGSIb3DQEBBQUAA4GBACMboVQjrx8u/fk3gl/sR0tbA0Wf/NcS
2Dzsy2czndgVUAG4Sqb+hfgn0dqAyUKghRrj3JDcYxYksGPIklDfPzZb7yJ39l16
6x5ZiIzhp8CAVdPvRxRznw5rZwaXesryXu1jVSZxTr3MYZdkG6KaAM0t90+YlGLZ
UG8fAicx0Bf+
-----END CERTIFICATE-----
subject=/C=US/ST=Texas/O=Nine Nines/OU=Cowboy/CN=localhost
issuer=/C=US/ST=Texas/O=Nine Nines/OU=Cowboy/CN=ROOT CA
---
No client certificate CA names sent
---
SSL handshake has read 1884 bytes and written 328 bytes
---
New, TLSv1/SSLv3, Cipher is DHE-RSA-AES256-SHA
Server public key is 1024 bit
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : TLSv1
Cipher : DHE-RSA-AES256-SHA
Session-ID: BE3546C897249847BA1C33BBBFF1CEA3DDB157F0F05CBFB95CB3624DB0E1EBB2
Session-ID-ctx:
Master-Key: 9D71E61D5C5B14AEBBDE30FDDB682896320C274C3E4BFD7C533D644905D6A6FFDC8EA2D68CA751BFC3F78CC2F2382C0E
Key-Arg : None
Start Time: 1388444241
Timeout : 300 (sec)
Verify return code: 0 (ok)
---
closed
/
curl -XGET https://171.138.2.2:8443 --insecure -v ⏎ ⬆ ✱ ◼
* About to connect() to 171.138.2.2 port 8443 (#0)
* Trying 171.138.2.2...
* Adding handle: conn: 0x7fded1003a00
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7fded1003a00) send_pipe: 1, recv_pipe: 0
* Connected to 171.138.2.2 (171.138.2.2) port 8443 (#0)
* Unknown SSL protocol error in connection to 171.138.2.2:-9800
* Closing connection 0
curl: (35) Unknown SSL protocol error in connection to 171.138.2.2:-9800
/
=ERROR REPORT==== 30-Dec-2013::21:42:58 ===
** State machine <0.444.0> terminating
** Last message in was {tcp,#Port<0.570>,
<<22,3,0,0,132,16,0,0,128,139,253,10,133,230,6,
180,230,50,236,61,32,156,14,120,30,173,93,117,
134,207,93,167,157,250,19,174,140,202,161,182,
126,240,187,10,81,146,65,195,165,61,44,8,114,
212,249,192,145,117,223,94,1,12,151,180,75,211,
203,4,117,219,196,114,164,222,103,51,128,222,
113,182,104,34,35,47,218,12,45,50,215,204,29,
171,60,234,222,131,6,10,215,136,173,130,253,157,
148,184,191,80,161,227,29,75,92,169,1,67,150,33,
166,255,189,212,95,202,225,207,79,78,83,65,160,
145,190,35,240,168,102,20,3,0,0,1,1,22,3,0,0,80,
78,99,197,221,65,244,254,6,85,100,6,134,226,95,
92,68,181,22,75,119,157,22,160,73,132,212,3,183,
25,114,253,139,176,231,118,108,196,145,180,113,
204,72,236,220,68,30,223,240,45,177,202,82,183,
64,200,220,172,221,19,98,196,170,93,110,152,133,
171,105,124,183,98,63,29,113,63,158,54,87,27,60>>}
** When State == certify
** Data == {state,server,
{#Ref<0.0.0.560>,<0.333.0>},
gen_tcp,tls_connection,tcp,tcp_closed,tcp_error,
"localhost",8443,#Port<0.570>,
{ssl_options,undefined,
[{3,3},{3,2},{3,1},{3,0}],
verify_none,
{#Fun<ssl.1.69131459>,[]},
false,false,undefined,1,
<<"/home/vagrant/cowboy/examples/ssl_hello_world/_rel/lib/ssl_hello_world-1/priv/ssl/server.crt">>,
undefined,
<<"/home/vagrant/cowboy/examples/ssl_hello_world/_rel/lib/ssl_hello_world-1/priv/ssl/server.key">>,
undefined,undefined,undefined,
<<"/home/vagrant/cowboy/examples/ssl_hello_world/_rel/lib/ssl_hello_world-1/priv/ssl/cowboy-ca.crt">>,
undefined,undefined,undefined,undefined,undefined,
[<<"À$">>,<<"À(">>,<<"À&">>,<<"À*">>,
<<0,107>>,
<<0,106>>,
<<0,61>>,
<<"À#">>,<<"À'">>,<<"À%">>,<<"À)">>,
<<0,103>>,
<<0,64>>,
<<0,60>>,
<<"À\n">>,
<<192,20>>,
<<0,57>>,
<<0,56>>,
<<192,5>>,
<<192,15>>,
<<0,53>>,
<<"À\b">>,
<<192,18>>,
<<0,22>>,
<<0,19>>,
<<192,3>>,
<<"À\r">>,
<<0,10>>,
<<"À\t">>,
<<192,19>>,
<<0,51>>,
<<0,50>>,
<<192,4>>,
<<192,14>>,
<<0,47>>,
<<192,7>>,
<<192,17>>,
<<0,5>>,
<<0,4>>,
<<0,21>>,
<<192,2>>,
<<"À\f">>,
<<0,9>>],
#Fun<ssl.0.69131459>,true,268435456,false,undefined,
undefined,false,undefined,undefined,true,undefined},
{socket_options,binary,0,0,0,false},
{connection_states,
{connection_state,
{security_parameters,
<<0,0>>,
0,0,0,0,0,0,0,0,0,0,0,undefined,undefined,
undefined,undefined},
undefined,undefined,undefined,undefined,1,false,
undefined,undefined},
{connection_state,
{security_parameters,
<<0,61>>,
0,7,1,16,256,32,unknown,4,4711,32,0,
undefined,
<<82,193,232,229,83,119,207,47,74,214,130,81,
162,195,5,2,186,169,68,25,54,229,239,100,65,
18,206,208,86,117,188,227>>,
<<82,193,232,226,216,39,232,210,242,178,174,
39,253,61,22,174,195,97,169,156,55,54,103,
154,135,147,73,254,174,79,244,93>>,
undefined},
undefined,undefined,undefined,undefined,
undefined,false,undefined,undefined},
{connection_state,
{security_parameters,
<<0,0>>,
0,0,0,0,0,0,0,0,0,0,0,undefined,undefined,
undefined,undefined},
undefined,undefined,undefined,undefined,3,false,
undefined,undefined},
{connection_state,
{security_parameters,
<<0,61>>,
0,7,1,16,256,32,unknown,4,4711,32,0,
undefined,
<<82,193,232,229,83,119,207,47,74,214,130,81,
162,195,5,2,186,169,68,25,54,229,239,100,65,
18,206,208,86,117,188,227>>,
<<82,193,232,226,216,39,232,210,242,178,174,
39,253,61,22,174,195,97,169,156,55,54,103,
154,135,147,73,254,174,79,244,93>>,
undefined},
undefined,undefined,undefined,undefined,
undefined,false,undefined,undefined}},
{protocol_buffers,[],<<>>,<<>>,[]},
{[[14,<<0,0,0>>,<<>>],
[11,
<<0,5,46>>,
<<0,5,43,0,2,169,48,130,2,165,48,130,2,14,160,3,2,1,2,
2,9,0,235,233,83,76,182,123,146,121,48,13,6,9,42,
134,72,134,247,13,1,1,5,5,0,48,85,49,11,48,9,6,3,85,
4,6,19,2,85,83,49,14,48,12,6,3,85,4,8,12,5,84,101,
120,97,115,49,19,48,17,6,3,85,4,10,12,10,78,105,110,
101,32,78,105,110,101,115,49,15,48,13,6,3,85,4,11,
12,6,67,111,119,98,111,121,49,16,48,14,6,3,85,4,3,
12,7,82,79,79,84,32,67,65,48,30,23,13,49,51,48,50,
50,56,48,53,50,51,51,52,90,23,13,51,51,48,50,50,51,
48,53,50,51,51,52,90,48,87,49,11,48,9,6,3,85,4,6,19,
2,85,83,49,14,48,12,6,3,85,4,8,12,5,84,101,120,97,
115,49,19,48,17,6,3,85,4,10,12,10,78,105,110,101,32,
78,105,110,101,115,49,15,48,13,6,3,85,4,11,12,6,67,
111,119,98,111,121,49,18,48,16,6,3,85,4,3,12,9,108,
111,99,97,108,104,111,115,116,48,129,159,48,13,6,9,
42,134,72,134,247,13,1,1,1,5,0,3,129,141,0,48,129,
137,2,129,129,0,205,181,181,26,49,2,204,117,28,253,
100,147,168,184,128,26,168,194,53,199,17,230,198,
149,75,236,168,207,100,143,70,26,104,201,253,63,168,
26,215,228,22,52,183,57,160,163,58,19,137,23,196,
227,0,162,84,63,125,9,207,131,174,159,197,51,143,
107,224,74,89,118,135,8,162,250,107,152,233,175,254,
12,36,162,63,121,205,160,58,60,163,103,212,231,102,
14,157,161,192,155,23,217,153,183,146,150,198,81,
148,241,140,57,36,113,201,160,81,190,4,140,190,234,
52,122,187,177,164,45,138,245,2,3,1,0,1,163,123,48,
121,48,9,6,3,85,29,19,4,2,48,0,48,44,6,9,96,134,72,
1,134,248,66,1,13,4,31,22,29,79,112,101,110,83,83,
76,32,71,101,110,101,114,97,116,101,100,32,67,101,
114,116,105,102,105,99,97,116,101,48,29,6,3,85,29,
14,4,22,4,20,30,163,76,66,22,35,196,245,114,67,145,
3,129,158,205,188,152,198,214,239,48,31,6,3,85,29,
35,4,24,48,22,128,20,74,125,159,10,23,104,229,44,16,
230,52,190,136,184,75,134,99,74,93,111,48,13,6,9,42,
134,72,134,247,13,1,1,5,5,0,3,129,129,0,35,27,161,
84,35,175,31,46,253,249,55,130,95,236,71,75,91,3,69,
159,252,215,18,216,60,236,203,103,51,157,216,21,80,
1,184,74,166,254,133,248,39,209,218,128,201,66,160,
133,26,227,220,144,220,99,22,36,176,99,200,146,80,
223,63,54,91,239,34,119,246,93,122,235,30,89,136,
140,225,167,192,128,85,211,239,71,20,115,159,14,107,
103,6,151,122,202,242,94,237,99,85,38,113,78,189,
204,97,151,100,27,162,154,0,205,45,247,79,152,148,
98,217,80,111,31,2,39,49,208,23,254,0,2,124,48,130,
2,120,48,130,1,225,160,3,2,1,2,2,9,0,235,233,83,76,
182,123,146,120,48,13,6,9,42,134,72,134,247,13,1,1,
5,5,0,48,85,49,11,48,9,6,3,85,4,6,19,2,85,83,49,14,
48,12,6,3,85,4,8,12,5,84,101,120,97,115,49,19,48,17,
6,3,85,4,10,12,10,78,105,110,101,32,78,105,110,101,
115,49,15,48,13,6,3,85,4,11,12,6,67,111,119,98,111,
121,49,16,48,14,6,3,85,4,3,12,7,82,79,79,84,32,67,
65,48,30,23,13,49,51,48,50,50,56,48,53,49,48,48,49,
90,23,13,51,51,48,50,50,51,48,53,49,48,48,49,90,48,
85,49,11,48,9,6,3,85,4,6,19,2,85,83,49,14,48,12,6,3,
85,4,8,12,5,84,101,120,97,115,49,19,48,17,6,3,85,4,
10,12,10,78,105,110,101,32,78,105,110,101,115,49,15,
48,13,6,3,85,4,11,12,6,67,111,119,98,111,121,49,16,
48,14,6,3,85,4,3,12,7,82,79,79,84,32,67,65,48,129,
159,48,13,6,9,42,134,72,134,247,13,1,1,1,5,0,3,129,
141,0,48,129,137,2,129,129,0,204,230,99,181,44,211,
172,163,201,70,233,171,3,241,34,255,177,135,248,55,
87,188,30,211,176,165,11,209,132,98,123,235,220,228,
47,116,13,99,20,65,220,112,192,84,82,52,104,67,192,
207,119,171,146,200,174,84,146,44,64,6,205,60,78,
222,65,221,91,39,24,170,244,12,131,126,32,238,18,55,
99,228,152,26,136,83,240,77,220,167,92,192,222,185,
96,218,247,136,205,10,176,165,158,22,208,25,117,140,
120,9,169,23,237,17,27,59,76,35,43,109,0,31,124,82,
6,125,238,20,104,129,2,3,1,0,1,163,80,48,78,48,29,6,
3,85,29,14,4,22,4,20,74,125,159,10,23,104,229,44,16,
230,52,190,136,184,75,134,99,74,93,111,48,31,6,3,85,
29,35,4,24,48,22,128,20,74,125,159,10,23,104,229,44,
16,230,52,190,136,184,75,134,99,74,93,111,48,12,6,3,
85,29,19,4,5,48,3,1,1,255,48,13,6,9,42,134,72,134,
247,13,1,1,5,5,0,3,129,129,0,109,72,210,64,113,94,
34,228,51,86,251,174,93,179,60,184,179,68,70,32,214,
111,154,141,190,171,91,51,206,6,14,147,94,59,249,
240,23,190,31,139,106,160,114,11,252,207,220,174,44,
94,195,151,166,126,208,100,184,1,163,136,163,33,108,
138,36,142,246,167,104,244,194,87,197,58,28,123,205,
191,63,92,235,193,233,17,37,155,119,238,122,112,122,
159,177,46,87,8,170,117,58,149,185,181,178,246,81,6,
41,20,163,15,226,169,155,191,113,26,164,23,207,62,
100,133,48,22,245,139,96,8>>],
[2,
<<0,0,70>>,
<<3,0,82,193,232,226,216,39,232,210,242,178,174,39,
253,61,22,174,195,97,169,156,55,54,103,154,135,147,
73,254,174,79,244,93,32,89,112,212,213,72,159,241,
19,8,91,184,240,90,145,242,152,170,23,194,252,48,
232,230,14,15,206,87,233,56,81,37,74,0,61,0>>],
<<1,0,0,65,3,0,82,193,232,229,83,119,207,47,74,214,130,
81,162,195,5,2,186,169,68,25,54,229,239,100,65,18,
206,208,86,117,188,227,0,0,26,0,255,0,61,0,60,0,47,0,
5,0,4,0,53,0,10,0,103,0,107,0,51,0,57,0,22,1,0>>],
[[11,
<<0,5,46>>,
<<0,5,43,0,2,169,48,130,2,165,48,130,2,14,160,3,2,1,2,
2,9,0,235,233,83,76,182,123,146,121,48,13,6,9,42,
134,72,134,247,13,1,1,5,5,0,48,85,49,11,48,9,6,3,85,
4,6,19,2,85,83,49,14,48,12,6,3,85,4,8,12,5,84,101,
120,97,115,49,19,48,17,6,3,85,4,10,12,10,78,105,110,
101,32,78,105,110,101,115,49,15,48,13,6,3,85,4,11,
12,6,67,111,119,98,111,121,49,16,48,14,6,3,85,4,3,
12,7,82,79,79,84,32,67,65,48,30,23,13,49,51,48,50,
50,56,48,53,50,51,51,52,90,23,13,51,51,48,50,50,51,
48,53,50,51,51,52,90,48,87,49,11,48,9,6,3,85,4,6,19,
2,85,83,49,14,48,12,6,3,85,4,8,12,5,84,101,120,97,
115,49,19,48,17,6,3,85,4,10,12,10,78,105,110,101,32,
78,105,110,101,115,49,15,48,13,6,3,85,4,11,12,6,67,
111,119,98,111,121,49,18,48,16,6,3,85,4,3,12,9,108,
111,99,97,108,104,111,115,116,48,129,159,48,13,6,9,
42,134,72,134,247,13,1,1,1,5,0,3,129,141,0,48,129,
137,2,129,129,0,205,181,181,26,49,2,204,117,28,253,
100,147,168,184,128,26,168,194,53,199,17,230,198,
149,75,236,168,207,100,143,70,26,104,201,253,63,168,
26,215,228,22,52,183,57,160,163,58,19,137,23,196,
227,0,162,84,63,125,9,207,131,174,159,197,51,143,
107,224,74,89,118,135,8,162,250,107,152,233,175,254,
12,36,162,63,121,205,160,58,60,163,103,212,231,102,
14,157,161,192,155,23,217,153,183,146,150,198,81,
148,241,140,57,36,113,201,160,81,190,4,140,190,234,
52,122,187,177,164,45,138,245,2,3,1,0,1,163,123,48,
121,48,9,6,3,85,29,19,4,2,48,0,48,44,6,9,96,134,72,
1,134,248,66,1,13,4,31,22,29,79,112,101,110,83,83,
76,32,71,101,110,101,114,97,116,101,100,32,67,101,
114,116,105,102,105,99,97,116,101,48,29,6,3,85,29,
14,4,22,4,20,30,163,76,66,22,35,196,245,114,67,145,
3,129,158,205,188,152,198,214,239,48,31,6,3,85,29,
35,4,24,48,22,128,20,74,125,159,10,23,104,229,44,16,
230,52,190,136,184,75,134,99,74,93,111,48,13,6,9,42,
134,72,134,247,13,1,1,5,5,0,3,129,129,0,35,27,161,
84,35,175,31,46,253,249,55,130,95,236,71,75,91,3,69,
159,252,215,18,216,60,236,203,103,51,157,216,21,80,
1,184,74,166,254,133,248,39,209,218,128,201,66,160,
133,26,227,220,144,220,99,22,36,176,99,200,146,80,
223,63,54,91,239,34,119,246,93,122,235,30,89,136,
140,225,167,192,128,85,211,239,71,20,115,159,14,107,
103,6,151,122,202,242,94,237,99,85,38,113,78,189,
204,97,151,100,27,162,154,0,205,45,247,79,152,148,
98,217,80,111,31,2,39,49,208,23,254,0,2,124,48,130,
2,120,48,130,1,225,160,3,2,1,2,2,9,0,235,233,83,76,
182,123,146,120,48,13,6,9,42,134,72,134,247,13,1,1,
5,5,0,48,85,49,11,48,9,6,3,85,4,6,19,2,85,83,49,14,
48,12,6,3,85,4,8,12,5,84,101,120,97,115,49,19,48,17,
6,3,85,4,10,12,10,78,105,110,101,32,78,105,110,101,
115,49,15,48,13,6,3,85,4,11,12,6,67,111,119,98,111,
121,49,16,48,14,6,3,85,4,3,12,7,82,79,79,84,32,67,
65,48,30,23,13,49,51,48,50,50,56,48,53,49,48,48,49,
90,23,13,51,51,48,50,50,51,48,53,49,48,48,49,90,48,
85,49,11,48,9,6,3,85,4,6,19,2,85,83,49,14,48,12,6,3,
85,4,8,12,5,84,101,120,97,115,49,19,48,17,6,3,85,4,
10,12,10,78,105,110,101,32,78,105,110,101,115,49,15,
48,13,6,3,85,4,11,12,6,67,111,119,98,111,121,49,16,
48,14,6,3,85,4,3,12,7,82,79,79,84,32,67,65,48,129,
159,48,13,6,9,42,134,72,134,247,13,1,1,1,5,0,3,129,
141,0,48,129,137,2,129,129,0,204,230,99,181,44,211,
172,163,201,70,233,171,3,241,34,255,177,135,248,55,
87,188,30,211,176,165,11,209,132,98,123,235,220,228,
47,116,13,99,20,65,220,112,192,84,82,52,104,67,192,
207,119,171,146,200,174,84,146,44,64,6,205,60,78,
222,65,221,91,39,24,170,244,12,131,126,32,238,18,55,
99,228,152,26,136,83,240,77,220,167,92,192,222,185,
96,218,247,136,205,10,176,165,158,22,208,25,117,140,
120,9,169,23,237,17,27,59,76,35,43,109,0,31,124,82,
6,125,238,20,104,129,2,3,1,0,1,163,80,48,78,48,29,6,
3,85,29,14,4,22,4,20,74,125,159,10,23,104,229,44,16,
230,52,190,136,184,75,134,99,74,93,111,48,31,6,3,85,
29,35,4,24,48,22,128,20,74,125,159,10,23,104,229,44,
16,230,52,190,136,184,75,134,99,74,93,111,48,12,6,3,
85,29,19,4,5,48,3,1,1,255,48,13,6,9,42,134,72,134,
247,13,1,1,5,5,0,3,129,129,0,109,72,210,64,113,94,
34,228,51,86,251,174,93,179,60,184,179,68,70,32,214,
111,154,141,190,171,91,51,206,6,14,147,94,59,249,
240,23,190,31,139,106,160,114,11,252,207,220,174,44,
94,195,151,166,126,208,100,184,1,163,136,163,33,108,
138,36,142,246,167,104,244,194,87,197,58,28,123,205,
191,63,92,235,193,233,17,37,155,119,238,122,112,122,
159,177,46,87,8,170,117,58,149,185,181,178,246,81,6,
41,20,163,15,226,169,155,191,113,26,164,23,207,62,
100,133,48,22,245,139,96,8>>],
[2,
<<0,0,70>>,
<<3,0,82,193,232,226,216,39,232,210,242,178,174,39,
253,61,22,174,195,97,169,156,55,54,103,154,135,147,
73,254,174,79,244,93,32,89,112,212,213,72,159,241,
19,8,91,184,240,90,145,242,152,170,23,194,252,48,
232,230,14,15,206,87,233,56,81,37,74,0,61,0>>],
<<1,0,0,65,3,0,82,193,232,229,83,119,207,47,74,214,
130,81,162,195,5,2,186,169,68,25,54,229,239,100,65,
18,206,208,86,117,188,227,0,0,26,0,255,0,61,0,60,0,
47,0,5,0,4,0,53,0,10,0,103,0,107,0,51,0,57,0,22,1,0>>]},
12309,
{session,
<<89,112,212,213,72,159,241,19,8,91,184,240,90,145,
242,152,170,23,194,252,48,232,230,14,15,206,87,233,
56,81,37,74>>,
undefined,
<<48,130,2,165,48,130,2,14,160,3,2,1,2,2,9,0,235,233,
83,76,182,123,146,121,48,13,6,9,42,134,72,134,247,
13,1,1,5,5,0,48,85,49,11,48,9,6,3,85,4,6,19,2,85,83,
49,14,48,12,6,3,85,4,8,12,5,84,101,120,97,115,49,19,
48,17,6,3,85,4,10,12,10,78,105,110,101,32,78,105,
110,101,115,49,15,48,13,6,3,85,4,11,12,6,67,111,119,
98,111,121,49,16,48,14,6,3,85,4,3,12,7,82,79,79,84,
32,67,65,48,30,23,13,49,51,48,50,50,56,48,53,50,51,
51,52,90,23,13,51,51,48,50,50,51,48,53,50,51,51,52,
90,48,87,49,11,48,9,6,3,85,4,6,19,2,85,83,49,14,48,
12,6,3,85,4,8,12,5,84,101,120,97,115,49,19,48,17,6,
3,85,4,10,12,10,78,105,110,101,32,78,105,110,101,
115,49,15,48,13,6,3,85,4,11,12,6,67,111,119,98,111,
121,49,18,48,16,6,3,85,4,3,12,9,108,111,99,97,108,
104,111,115,116,48,129,159,48,13,6,9,42,134,72,134,
247,13,1,1,1,5,0,3,129,141,0,48,129,137,2,129,129,0,
205,181,181,26,49,2,204,117,28,253,100,147,168,184,
128,26,168,194,53,199,17,230,198,149,75,236,168,207,
100,143,70,26,104,201,253,63,168,26,215,228,22,52,
183,57,160,163,58,19,137,23,196,227,0,162,84,63,125,
9,207,131,174,159,197,51,143,107,224,74,89,118,135,
8,162,250,107,152,233,175,254,12,36,162,63,121,205,
160,58,60,163,103,212,231,102,14,157,161,192,155,23,
217,153,183,146,150,198,81,148,241,140,57,36,113,
201,160,81,190,4,140,190,234,52,122,187,177,164,45,
138,245,2,3,1,0,1,163,123,48,121,48,9,6,3,85,29,19,
4,2,48,0,48,44,6,9,96,134,72,1,134,248,66,1,13,4,31,
22,29,79,112,101,110,83,83,76,32,71,101,110,101,114,
97,116,101,100,32,67,101,114,116,105,102,105,99,97,
116,101,48,29,6,3,85,29,14,4,22,4,20,30,163,76,66,
22,35,196,245,114,67,145,3,129,158,205,188,152,198,
214,239,48,31,6,3,85,29,35,4,24,48,22,128,20,74,125,
159,10,23,104,229,44,16,230,52,190,136,184,75,134,
99,74,93,111,48,13,6,9,42,134,72,134,247,13,1,1,5,5,
0,3,129,129,0,35,27,161,84,35,175,31,46,253,249,55,
130,95,236,71,75,91,3,69,159,252,215,18,216,60,236,
203,103,51,157,216,21,80,1,184,74,166,254,133,248,
39,209,218,128,201,66,160,133,26,227,220,144,220,99,
22,36,176,99,200,146,80,223,63,54,91,239,34,119,246,
93,122,235,30,89,136,140,225,167,192,128,85,211,239,
71,20,115,159,14,107,103,6,151,122,202,242,94,237,
99,85,38,113,78,189,204,97,151,100,27,162,154,0,205,
45,247,79,152,148,98,217,80,111,31,2,39,49,208,23,
254>>,
0,
<<0,61>>,
undefined,undefined,new,63555658978,
{namedCurve,{1,3,132,0,10}}},
24600,ssl_session_cache,
{3,0},
false,rsa,
{md5sha,rsa},
undefined,undefined,
{'RSAPrivateKey','two-prime',
144454330320215406279953568628491651436272064667760200600239478371082943052406671504117055906783067021801616968245536600804524397616119868619607006483647544685500850941126623013107537763694736146580312576904568190966271012889302320531771708303887413277040358538410888392437638452540396352971161638449355524853,
65537,
73204712125898257066539785484374700207538761489626497739218358418304266363375350931454531955629327279675226250047618316156062442492432871150562093158595929861645207004805143224301142784252923544528642753586128143795822075378492041658337293501262418025765173041032078326754603429465910120868854364368761429201,
12409245209930291447247239924477421554422342691049522744682066747411093386494444412927210450320664706994439584861374039294647270998616160644861846073378259,
11640863555876729591293658050638688457819089673191184844099049264919570207258877842606090659931039571345985188808022236822519080449417185618893981473228567,
2154960094819974166671053566389635392387211531910746881261372990101555668274307213688825886676220837546786043232178737830727384397138265778097451365810427,
6762454144976713139138687295785833147170123472812835335528617477364204600924058123254025719897073997288315731698109809730487303826391368095618225775497169,
7180355181523602803171077101567268495945877135212371810154532744900497574860359113504760029679264075920221277544184450364146735406420347367341011819418291,
asn1_NOVALUE},
{'DHParameter',
179769313486231590770839156793787453197860296048756011706444423684197180216158519368947833795864925541502180565485980503646440548199239100050792877003355816639229553136239076508735759914822574862575007425302077447712589550957937778424442426617334727629299387668709205606050270810842907692932019128194467627007,
2,asn1_NOVALUE},
undefined,undefined,undefined,undefined,undefined,16406,
#Ref<0.0.0.544>,undefined,<<>>,
{false,first},
{<0.333.0>,#Ref<0.0.0.562>},
#Ref<0.0.0.563>,
{[],[]},
false,true,false,undefined,
{undefined,undefined}}
** Reason for termination =
** {{case_clause,{4}},
[{ssl_v3,mac_hash,3,[{file,"ssl_v3.erl"},{line,163}]},
{tls_record,decode_cipher_text,2,[{file,"tls_record.erl"},{line,153}]},
{tls_connection,next_record,1,[{file,"tls_connection.erl"},{line,503}]},
{tls_connection,next_state,4,[{file,"tls_connection.erl"},{line,475}]},
{ssl_connection,certify,3,[{file,"ssl_connection.erl"},{line,517}]},
{tls_connection,next_state,4,[{file,"tls_connection.erl"},{line,458}]},
{gen_fsm,handle_msg,7,[{file,"gen_fsm.erl"},{line,505}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}
The webpage at https://171.138.2.2:8443/ might be temporarily down or it may have moved permanently to a new web address.
Error code: ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED
[locojay@ubuntu]~/D/c/e/ssl_hello_world git:master ❯❯❯ curl -XGET https://171.138.2.2:8443 --insecure -i -v
* About to connect() to 171.138.2.2 port 8443 (#0)
* Trying 171.138.2.2... connected
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server key exchange (12):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using ECDHE-RSA-AES256-SHA
* Server certificate:
* subject: C=US; ST=Texas; O=Nine Nines; OU=Cowboy; CN=localhost
* start date: 2013-02-28 05:23:34 GMT
* expire date: 2033-02-23 05:23:34 GMT
* issuer: C=US; ST=Texas; O=Nine Nines; OU=Cowboy; CN=ROOT CA
* SSL certificate verify result: self signed certificate in certificate chain (19), continuing anyway.
> GET / HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: 171.138.2.2:8443
> Accept: */*
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< connection: keep-alive
connection: keep-alive
< server: Cowboy
server: Cowboy
< date: Mon, 30 Dec 2013 21:48:00 GMT
date: Mon, 30 Dec 2013 21:48:00 GMT
< content-length: 12
content-length: 12
< content-type: text/plain
content-type: text/plain
<
* Connection #0 to host 171.138.2.2 left intact
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):
Hello world!% [locojay@ubuntu]~/D/c/e/ssl_hello_world git:master ❯❯❯
import requests; requests.get("https://171.138.2.2:8443", verify=False).content
Out[4]: 'Hello world!'
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
config.vm.define :ejabberdbox do |ejabberdbox_config|
ejabberdbox_config.vm.box = 'precise64'
ejabberdbox_config.vm.box_url = "http://dl.dropbox.com/u/1537815/precise64.box"
ejabberdbox_config.vm.network :forwarded_port, guest: 5280, host: 55280, auto_correct: true
ejabberdbox_config.vm.network :forwarded_port, guest: 5281, host: 55281, auto_correct: true
ejabberdbox_config.vm.network :forwarded_port, guest: 5288, host: 55288, auto_correct: true
ejabberdbox_config.vm.network :forwarded_port, guest: 5289, host: 55289, auto_correct: true
ejabberdbox_config.vm.network :forwarded_port, guest: 8443, host: 8443, auto_correct: true
ejabberdbox_config.vm.provider :virtualbox do |vb, override|
vb.customize ["modifyvm", :id, "--memory", "256"]
vb.customize ["modifyvm", :id, "--cpus", 1]
override.vm.hostname = "whisphost"
end
end
end
@jassinm
Copy link
Author

jassinm commented Dec 30, 2013

vagrant@whisphost:/vagrant/apps$ dpkg -l | grep openssl
ii  openssl                          1.0.1-4ubuntu5.10            Secure Socket Layer (SSL) binary and related cryptographic tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment