Hello,
> 3. server (openSSL) requires the client certificate to be sent in. The
> client certificate that I send in is signed by the root certificate
> which exists on the server. Therefore the client should be trusted
>
>
> Below is the debug trace:
>
> trigger seeding of SecureRandom
> done seeding SecureRandom
> JsseJce: Using cipher AES/CBC/NoPadding from provider SunJCE
> %% No cached client session
> *** ClientHello, TLSv1
> RandomCookie: GMT: 1176916508 bytes = { 130, 86, 33, 206, 109, 117, 37,
> 96, 234, 191, 235, 56, 229, 90, 43, 166, 20, 202, 189, 44, 123, 159, 53,
> 248, 13, 50, 13, 127 }
> Session ID: {}
> Cipher Suites: [SSL_RSA_WITH_RC4_128_SHA, SSL_RSA_WITH_RC4_128_MD5,
> TLS_RSA_WITH_AES_128_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA,
> SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_DES_CBC_SHA,
> SSL_DHE_DSS_WITH_DES_CBC_SHA, SSL_RSA_EXPORT_WITH_RC4_40_MD5,
> SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA,
> SSL_RSA_WITH_NULL_MD5, SSL_RSA_WITH_NULL_SHA]
> Compression Methods: { 0 }
> ***
> [write] MD5 and SHA1 hashes: len = 67
> 0000: 01 00 00 3F 03 01 46 26 52 1C 82 56 21 CE 6D 75
> ....?..F&R..V!.mu
> 0010: 25 60 EA BF EB 38 E5 5A 2B A6 14 CA BD 2C 7B 9F
> %`...8.Z+....,..
> 0020: 35 F8 0D 32 0D 7F 00 00 18 00 05 00 04 00 2F 00
> 5..2........../.
> 0030: 0A 00 13 00 09 00 12 00 03 00 11 00 32 00 01 00
> .............2...
> 0040: 02 01 00 ...
> main, WRITE: TLSv1 Handshake, length = 67
> [write] MD5 and SHA1 hashes: len = 89
> 0000: 01 03 01 00 30 00 00 00 20 00 00 05 00 00 04 01 ....0...
> ........
> 0010: 00 80 00 00 2F 00 00 0A 07 00 C0 00 00 13 00 00
> ...../...........
> 0020: 09 06 00 40 00 00 12 00 00 03 02 00 80 00 00 11
> [EMAIL PROTECTED]
> 0030: 00 00 32 00 00 01 00 00 02 46 26 52 1C 82 56 21
> ...2......F&R..V!
> 0040: CE 6D 75 25 60 EA BF EB 38 E5 5A 2B A6 14 CA BD
> ..mu%`...8.Z+....
> 0050: 2C 7B 9F 35 F8 0D 32 0D 7F ,..5..2..
> main, WRITE: SSLv2 client hello message, length = 89
Client write ssl2 client_hello with some cipher proposition.
> main, READ: TLSv1 Handshake, length = 74
> *** ServerHello, TLSv1
> RandomCookie: GMT: 1176916541 bytes = { 45, 229, 111, 4, 214, 4, 165,
> 223, 225, 54, 122, 132, 33, 91, 145, 240, 233, 49, 201, 33, 9, 181, 230,
> 193, 255, 149, 175, 33 }
> Session ID: {2, 18, 90, 147, 29, 80, 116, 91, 86, 137, 193, 208, 108,
> 46, 253, 8, 116, 148, 142, 161, 214, 52, 109, 80, 5, 46, 143, 80, 163,
> 109, 41, 137}
> Cipher Suite: SSL_RSA_WITH_RC4_128_SHA
> Compression Method: 0
OpenSSL server response server_hello with selected by server crypto
parameters (cipher suite, cookie ...)
> %% Created: [Session-1, SSL_RSA_WITH_RC4_128_SHA]
> ** SSL_RSA_WITH_RC4_128_SHA
> [read] MD5 and SHA1 hashes: len = 74
> 0000: 02 00 00 46 03 01 46 26 52 3D 2D E5 6F 04 D6 04
> ....F..F&R=-.o...
> 0010: A5 DF E1 36 7A 84 21 5B 91 F0 E9 31 C9 21 09 B5
> ....6z.![...1.!..
> 0020: E6 C1 FF 95 AF 21 20 02 12 5A 93 1D 50 74 5B 56 .....!
> ...Z..Pt[V
> 0030: 89 C1 D0 6C 2E FD 08 74 94 8E A1 D6 34 6D 50 05
> ....l...t....4mP.
> 0040: 2E 8F 50 A3 6D 29 89 00 05 00 ..P.m)....
> main, READ: TLSv1 Handshake, length = 1119
> *** Certificate chain
> chain [0] = [
> [
> Version: V3
> Subject: CN=clldc-s-6132.americas.shell.com
> Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5
>
..
..
..
> 0410: B6 E5 EF 71 4C 4E 87 B7 07 E4 F9 D7 86 B2 D8 A6
> ....qLN..........
> 0420: E4 07 95 9D 89 76 70 D9 CC 55 AE 0D CC B3 CF 03
> ......vp..U......
> 0430: 4D 4B 68 AD AF F0 A8 CD 02 0B 71 30 2D 6D D6 27
> MKh.......q0-m.'
> 0440: 8A 9D 2A 9D 82 AE 44 6E 58 CE A6 AB 22 C2 B0 66
> ...*...DnX..."..f
> 0450: 2E 12 D8 0F 7D 86 2F 66 70 91 8B C6 92 B3 AA ....../fp......
OpenSSL server response with Certificate packet (server certificate)
> main, READ: TLSv1 Handshake, length = 61
> *** CertificateRequest
> Cert Types: RSA, DSS, Type-64,
> Cert Authorities:
> <CN=root.CRLL7GW1.americas.shell.com>
> [read] MD5 and SHA1 hashes: len = 57
> 0000: 0D 00 00 35 03 01 02 40 00 2F 00 2D 30 2B 31 29
> [EMAIL PROTECTED]/.-0+1)
> 0010: 30 27 06 03 55 04 03 13 20 72 6F 6F 74 2E 43 52 0'..U...
> root.CR
> 0020: 4C 4C 37 47 57 31 2E 61 6D 65 72 69 63 61 73 2E
> LL7GW1.americas.
> 0030: 73 68 65 6C 6C 2E 63 6F 6D shell.com
OpenSSL request for client authentication (certificate_request packet).
In this packet server may send list of acceptable CA's, in this
case server tells clients that only certificate issued by:
CN=root.CRLL7GW1.americas.shell.com
are acceptable for authentication and client should have/use
only such certificate.
> *** ServerHelloDone
> [read] MD5 and SHA1 hashes: len = 4
> 0000: 0E 00 00 00 ....
> *** Certificate chain
Server ends this part of communication.
> JsseJCE: Using JSSE internal implementation for cipher
> RSA/ECB/PKCS1Padding
> *** ClientKeyExchange, RSA PreMasterSecret, TLSv1
> Random Secret: { 3, 1, 184, 9, 39, 136, 110, 217, 195, 252, 61, 235, 3,
> 1, 223, 66, 16, 150, 158, 254, 217, 76, 10, 16, 22, 239, 32, 245, 206,
> 131, 232, 218, 182, 29, 95, 124, 85, 46, 242, 241, 169, 132, 107, 113,
> 48, 225, 171, 60 }
Client generates pre_master_secret (first two bytes (3,1) for TLS1)
..
..
> .0080: 65 DF B3 8D C5 0E 73 7C 8B 94 AC 5E B6 e.....s....^.
> main, WRITE: TLSv1 Handshake, length = 141
and writes this to server as client_key_exchange packet.
next some information of key_material distribution:
> SESSION KEYGEN:
> PreMaster Secret:
> 0000: 03 01 B8 09 27 88 6E D9 C3 FC 3D EB 03 01 DF 42
> .....'.n...=....B
> 0010: 10 96 9E FE D9 4C 0A 10 16 EF 20 F5 CE 83 E8 DA .....L....
> ......
> 0020: B6 1D 5F 7C 55 2E F2 F1 A9 84 6B 71 30 E1 AB 3C
> ..._.U.....kq0..<
> CONNECTION KEYGEN:
> Client Nonce:
> 0000: 46 26 52 1C 82 56 21 CE 6D 75 25 60 EA BF EB 38
> F&R..V!.mu%`...8
> 0010: E5 5A 2B A6 14 CA BD 2C 7B 9F 35 F8 0D 32 0D 7F
> ..Z+....,..5..2..
> Server Nonce:
> 0000: 46 26 52 3D 2D E5 6F 04 D6 04 A5 DF E1 36 7A 84
> F&R=-.o......6z.
> 0010: 21 5B 91 F0 E9 31 C9 21 09 B5 E6 C1 FF 95 AF 21
> ![...1.!.......!
> Master Secret:
> 0000: 41 87 08 E5 88 37 60 1E 66 09 94 D9 FB 18 5B 03
> A....7`.f.....[.
> 0010: C3 51 FE 1C 84 7B E6 FE CA 3A F1 50 BC 8B 63 F4
> ..Q.......:.P..c.
> 0020: 37 32 1D A9 26 B5 FF DF 7E 59 54 F7 46 AC 15 6F
> 72..&....YT.F..o
> Client MAC write Secret:
> 0000: A2 AE 79 4E 46 AB B9 ED A4 2B 8B 6B 3F 95 D8 65
> ...yNF....+.k?..e
> 0010: CD 12 C9 FB ....
> Server MAC write Secret:
> 0000: 5A 11 DD D4 F8 E8 58 84 38 49 23 C5 BE 50 26 4A
> Z.....X.8I#..P&J
> 0010: 1C 35 2A 2A .5**
> Client write key:
> 0000: 49 26 A9 08 7D 5A 33 D1 7F AA 91 BB 43 68 6B DC
> I&...Z3.....Chk.
> Server write key:
> 0000: D2 73 41 32 84 8F 09 1A 3F F9 F2 57 EA C4 70 85
> ..sA2....?..W..p.
> .... no IV for cipher
> main, WRITE: TLSv1 Change Cipher Spec, length = 1
request from client to activate encryption (from client to server)
and here we have a problem because client should send after receiving
server_hello_done to server the following packets:
certificate
client_key_exchange
certificate_verify
change_cipher_spec
finished
but sends:
client_key_exchange
change_cipher_spec
finished
witch means that client do not want to authenticate to server.
My suggestion is to check that client has certificate issued by:
CN=root.CRLL7GW1.americas.shell.com
because this certificates are requested by server.
> JsseJCE: Using JSSE internal implementation for cipher RC4
> *** Finished
> verify_data: { 250, 0, 28, 224, 143, 7, 113, 110, 246, 8, 118, 140 }
> ***
Like I said above - finished packet send by client.
> [write] MD5 and SHA1 hashes: len = 16
> 0000: 14 00 00 0C FA 00 1C E0 8F 07 71 6E F6 08 76 8C
> ...........qn..v.
> Plaintext before ENCRYPTION: len = 36
> 0000: 14 00 00 0C FA 00 1C E0 8F 07 71 6E F6 08 76 8C
> ...........qn..v.
> 0010: 6C 89 0D 5C 7A 89 05 83 4D 24 29 E6 0F 40 30 00
> l..\z...M$)[EMAIL PROTECTED]
> 0020: 0F 39 8D F5 .9..
> main, WRITE: TLSv1 Handshake, length = 36
> main, READ: TLSv1 Alert, length = 2
> main, RECV TLSv1 ALERT: fatal, handshake_failure
> main, called closeSocket()
.... and error response from server.
Best regards,
--
Marek Marcola <[EMAIL PROTECTED]>
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [email protected]
Automated List Manager [EMAIL PROTECTED]