Closed mhabou closed 6 years ago
Hello @Dayssam,
could you try to build the lib from the current master sources? I added some onError calls for SSLException. Maybe this could help!
Greetings marci4
Hi @marci4
I got the same error with the curent master sources
***
found key for : localhost16
chain [0] = [
[
Version: V1
Subject: CN=localhost, OU=sofisoft, O=SofiSoft, L=Casablanca, ST=Casablanca, C=MA
Signature Algorithm: SHA256withRSA, OID = 1.2.840.113549.1.1.11
Key: Sun RSA public key, 1024 bits
modulus: 123305967866127895135250096688235484937121945450718380358917371399124253346709386004466389104242421166360785344280077222004077082809461310900467735014154077261856903926817905422244941920913784967092867528081733933790245573579176596115386851419936178686024588398583026693226855371939187095372462213116070534287
public exponent: 65537
Validity: [From: Thu Sep 28 18:05:02 WET 2017,
To: Mon Sep 28 18:05:02 WET 2037]
Issuer: CN=localhost, OU=sofisoft, O=SofiSoft, L=Casablanca, ST=Casablanca, C=MA
SerialNumber: [ 59cd39ce]
]
Algorithm: [SHA256withRSA]
Signature:
0000: 18 9A 4A FA 1B 95 C1 93 F2 42 E3 01 B2 AB 19 66 ..J......B.....f
0010: 4B 8D 0B 7C D1 DD DC DF 21 EE 95 E5 70 CD 9A 6B K.......!...p..k
0020: A3 A4 6E E4 76 80 A9 A2 DF D9 90 0E 11 D9 C6 2D ..n.v..........-
0030: 39 E0 A5 48 E7 D4 0D 38 87 37 1B 73 6D B4 39 F9 9..H...8.7.sm.9.
0040: 70 2F 19 B3 C6 C8 17 16 56 5F 33 C3 2D 89 5E 9D p/......V_3.-.^.
0050: 81 F5 79 50 BD 05 E1 59 5F 62 50 55 B1 75 CF 49 ..yP...Y_bPU.u.I
0060: E1 36 73 DF 9F DD FB 9D 65 45 2C 0B A1 25 13 FE .6s.....eE,..%..
0070: 5B 16 1D 27 46 E8 74 16 C9 8F FD A3 4D 9C BE F2 [..'F.t.....M...
]
***
adding as trusted cert:
Subject: CN=localhost, OU=sofisoft, O=SofiSoft, L=Casablanca, ST=Casablanca, C=MA
Issuer: CN=localhost, OU=sofisoft, O=SofiSoft, L=Casablanca, ST=Casablanca, C=MA
Algorithm: RSA; Serial number: 0x59cd39ce
Valid from Thu Sep 28 18:05:02 WET 2017 until Mon Sep 28 18:05:02 WET 2037
trigger seeding of SecureRandom
done seeding SecureRandom
WSServer started on port: 6789
Connection lost timer started
Finished DialogBox
Using SSLEngineImpl.
Ignoring unavailable cipher suite: TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Ignoring unavailable cipher suite: TLS_DHE_RSA_WITH_AES_256_CBC_SHA
Ignoring unavailable cipher suite: TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
Ignoring unavailable cipher suite: TLS_DHE_DSS_WITH_AES_256_CBC_SHA256
Ignoring unavailable cipher suite: TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Ignoring unavailable cipher suite: TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
Ignoring unavailable cipher suite: TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
Ignoring unavailable cipher suite: TLS_RSA_WITH_AES_256_CBC_SHA256
Ignoring unavailable cipher suite: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
Ignoring unavailable cipher suite: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
Ignoring unavailable cipher suite: TLS_DHE_DSS_WITH_AES_256_CBC_SHA
Ignoring unavailable cipher suite: TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
Ignoring unavailable cipher suite: TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
Ignoring unavailable cipher suite: TLS_RSA_WITH_AES_256_CBC_SHA
Allow unsafe renegotiation: false
Allow legacy hello messages: true
Is initial handshake: true
Is secure renegotiation: false
[Raw read]: length = 5
0000: 16 03 01 00 D5 .....
[Raw read]: length = 213
0000: 01 00 00 D1 03 03 2C 4C 01 A8 42 E9 1A 85 90 08 ......,L..B.....
0010: EF 03 B2 DB 35 3F F1 15 E6 B2 54 45 86 67 16 3A ....5?....TE.g.:
0020: D6 4C 43 04 67 05 20 59 CD 42 F2 2D AE 3E D8 4B .LC.g. Y.B.-.>.K
0030: 86 5B C5 26 86 78 86 EA 4B D5 07 2E 9B E6 9A E0 .[.&.x..K.......
0040: C4 EA FB F5 4C CE 7E 00 18 C0 2B C0 2F C0 2C C0 ....L.....+./.,.
0050: 30 C0 13 C0 14 00 9C 00 9D 00 2F 00 35 00 0A 00 0........./.5...
0060: FF 01 00 00 70 00 00 00 0E 00 0C 00 00 09 6C 6F ....p.........lo
0070: 63 61 6C 68 6F 73 74 00 0B 00 04 03 00 01 02 00 calhost.........
0080: 0A 00 1C 00 1A 00 17 00 19 00 1C 00 1B 00 18 00 ................
0090: 1A 00 16 00 0E 00 0D 00 0B 00 0C 00 09 00 0A 00 ................
00A0: 23 00 00 00 0D 00 20 00 1E 06 01 06 02 06 03 05 #..... .........
00B0: 01 05 02 05 03 04 01 04 02 04 03 03 01 03 02 03 ................
00C0: 03 02 01 02 02 02 03 00 05 00 05 01 00 00 00 00 ................
00D0: 00 0F 00 01 01 .....
WebsocketSelector10, READ: TLSv1 Handshake, length = 213
*** ClientHello, TLSv1.2
RandomCookie: GMT: 743178408 bytes = { 66, 233, 26, 133, 144, 8, 239, 3, 178, 219, 53, 63, 241, 21, 230, 178, 84, 69, 134, 103, 22, 58, 214, 76, 67, 4, 103, 5 }
Session ID: {89, 205, 66, 242, 45, 174, 62, 216, 75, 134, 91, 197, 38, 134, 120, 134, 234, 75, 213, 7, 46, 155, 230, 154, 224, 196, 234, 251, 245, 76, 206, 126}
Cipher Suites: [TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_GCM_SHA384, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, TLS_EMPTY_RENEGOTIATION_INFO_SCSV]
Compression Methods: { 0 }
Extension server_name, server_name: [host_name: localhost]
Extension ec_point_formats, formats: [uncompressed, ansiX962_compressed_prime, ansiX962_compressed_char2]
Extension elliptic_curves, curve names: {secp256r1, secp521r1, unknown curve 28, unknown curve 27, secp384r1, unknown curve 26, secp256k1, sect571r1, sect571k1, sect409k1, sect409r1, sect283k1, sect283r1}
Unsupported extension type_35, data:
Extension signature_algorithms, signature_algorithms: SHA512withRSA, Unknown (hash:0x6, signature:0x2), SHA512withECDSA, SHA384withRSA, Unknown (hash:0x5, signature:0x2), SHA384withECDSA, SHA256withRSA, Unknown (hash:0x4, signature:0x2), SHA256withECDSA, SHA224withRSA, Unknown (hash:0x3, signature:0x2), SHA224withECDSA, SHA1withRSA, SHA1withDSA, SHA1withECDSA
Unsupported extension status_request, data: 01:00:00:00:00
Unsupported extension type_15, data: 01
***
[read] MD5 and SHA1 hashes: len = 213
0000: 01 00 00 D1 03 03 2C 4C 01 A8 42 E9 1A 85 90 08 ......,L..B.....
0010: EF 03 B2 DB 35 3F F1 15 E6 B2 54 45 86 67 16 3A ....5?....TE.g.:
0020: D6 4C 43 04 67 05 20 59 CD 42 F2 2D AE 3E D8 4B .LC.g. Y.B.-.>.K
0030: 86 5B C5 26 86 78 86 EA 4B D5 07 2E 9B E6 9A E0 .[.&.x..K.......
0040: C4 EA FB F5 4C CE 7E 00 18 C0 2B C0 2F C0 2C C0 ....L.....+./.,.
0050: 30 C0 13 C0 14 00 9C 00 9D 00 2F 00 35 00 0A 00 0........./.5...
0060: FF 01 00 00 70 00 00 00 0E 00 0C 00 00 09 6C 6F ....p.........lo
0070: 63 61 6C 68 6F 73 74 00 0B 00 04 03 00 01 02 00 calhost.........
0080: 0A 00 1C 00 1A 00 17 00 19 00 1C 00 1B 00 18 00 ................
0090: 1A 00 16 00 0E 00 0D 00 0B 00 0C 00 09 00 0A 00 ................
00A0: 23 00 00 00 0D 00 20 00 1E 06 01 06 02 06 03 05 #..... .........
00B0: 01 05 02 05 03 04 01 04 02 04 03 03 01 03 02 03 ................
00C0: 03 02 01 02 02 02 03 00 05 00 05 01 00 00 00 00 ................
00D0: 00 0F 00 01 01 .....
%% Initialized: [Session-1, SSL_NULL_WITH_NULL_NULL]
matching alias: localhost16
%% Negotiating: [Session-1, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA]
*** ServerHello, TLSv1.2
RandomCookie: GMT: 1489851951 bytes = { 251, 148, 140, 169, 227, 249, 120, 76, 246, 38, 90, 104, 113, 149, 243, 142, 132, 78, 4, 48, 36, 123, 125, 6, 221, 62, 5, 136 }
Session ID: {89, 205, 86, 47, 95, 210, 14, 223, 235, 240, 59, 56, 115, 215, 246, 246, 159, 36, 32, 243, 88, 23, 59, 53, 0, 159, 224, 70, 38, 82, 248, 198}
Cipher Suite: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
Compression Method: 0
Extension renegotiation_info, renegotiated_connection: <empty>
***
Cipher suite: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
*** Certificate chain
chain [0] = [
[
Version: V1
Subject: CN=localhost, OU=sofisoft, O=SofiSoft, L=Casablanca, ST=Casablanca, C=MA
Signature Algorithm: SHA256withRSA, OID = 1.2.840.113549.1.1.11
Key: Sun RSA public key, 1024 bits
modulus: 123305967866127895135250096688235484937121945450718380358917371399124253346709386004466389104242421166360785344280077222004077082809461310900467735014154077261856903926817905422244941920913784967092867528081733933790245573579176596115386851419936178686024588398583026693226855371939187095372462213116070534287
public exponent: 65537
Validity: [From: Thu Sep 28 18:05:02 WET 2017,
To: Mon Sep 28 18:05:02 WET 2037]
Issuer: CN=localhost, OU=sofisoft, O=SofiSoft, L=Casablanca, ST=Casablanca, C=MA
SerialNumber: [ 59cd39ce]
]
Algorithm: [SHA256withRSA]
Signature:
0000: 18 9A 4A FA 1B 95 C1 93 F2 42 E3 01 B2 AB 19 66 ..J......B.....f
0010: 4B 8D 0B 7C D1 DD DC DF 21 EE 95 E5 70 CD 9A 6B K.......!...p..k
0020: A3 A4 6E E4 76 80 A9 A2 DF D9 90 0E 11 D9 C6 2D ..n.v..........-
0030: 39 E0 A5 48 E7 D4 0D 38 87 37 1B 73 6D B4 39 F9 9..H...8.7.sm.9.
0040: 70 2F 19 B3 C6 C8 17 16 56 5F 33 C3 2D 89 5E 9D p/......V_3.-.^.
0050: 81 F5 79 50 BD 05 E1 59 5F 62 50 55 B1 75 CF 49 ..yP...Y_bPU.u.I
0060: E1 36 73 DF 9F DD FB 9D 65 45 2C 0B A1 25 13 FE .6s.....eE,..%..
0070: 5B 16 1D 27 46 E8 74 16 C9 8F FD A3 4D 9C BE F2 [..'F.t.....M...
]
***
*** ECDH ServerKeyExchange
Signature Algorithm SHA512withRSA
Server key: Sun EC public key, 256 bits
public x coord: 52488722484077799282330395125011254755727576858610461731640897288562032674207
public y coord: 98977771087201195394399530651292200955473163300636549869261006251938011542125
parameters: secp256r1 [NIST P-256, X9.62 prime256v1] (1.2.840.10045.3.1.7)
*** ServerHelloDone
[write] MD5 and SHA1 hashes: len = 900
0000: 02 00 00 4D 03 03 59 CD 56 2F FB 94 8C A9 E3 F9 ...M..Y.V/......
0010: 78 4C F6 26 5A 68 71 95 F3 8E 84 4E 04 30 24 7B xL.&Zhq....N.0$.
0020: 7D 06 DD 3E 05 88 20 59 CD 56 2F 5F D2 0E DF EB ...>.. Y.V/_....
0030: F0 3B 38 73 D7 F6 F6 9F 24 20 F3 58 17 3B 35 00 .;8s....$ .X.;5.
0040: 9F E0 46 26 52 F8 C6 C0 13 00 00 05 FF 01 00 01 ..F&R...........
0050: 00 0B 00 02 5E 00 02 5B 00 02 58 30 82 02 54 30 ....^..[..X0..T0
0060: 82 01 BD 02 04 59 CD 39 CE 30 0D 06 09 2A 86 48 .....Y.9.0...*.H
0070: 86 F7 0D 01 01 0B 05 00 30 71 31 0B 30 09 06 03 ........0q1.0...
0080: 55 04 06 13 02 4D 41 31 13 30 11 06 03 55 04 08 U....MA1.0...U..
0090: 0C 0A 43 61 73 61 62 6C 61 6E 63 61 31 13 30 11 ..Casablanca1.0.
00A0: 06 03 55 04 07 0C 0A 43 61 73 61 62 6C 61 6E 63 ..U....Casablanc
00B0: 61 31 11 30 0F 06 03 55 04 0A 0C 08 53 6F 66 69 a1.0...U....Sofi
00C0: 53 6F 66 74 31 11 30 0F 06 03 55 04 0B 0C 08 73 Soft1.0...U....s
00D0: 6F 66 69 73 6F 66 74 31 12 30 10 06 03 55 04 03 ofisoft1.0...U..
00E0: 0C 09 6C 6F 63 61 6C 68 6F 73 74 30 1E 17 0D 31 ..localhost0...1
00F0: 37 30 39 32 38 31 38 30 35 30 32 5A 17 0D 33 37 70928180502Z..37
0100: 30 39 32 38 31 38 30 35 30 32 5A 30 71 31 0B 30 0928180502Z0q1.0
0110: 09 06 03 55 04 06 13 02 4D 41 31 13 30 11 06 03 ...U....MA1.0...
0120: 55 04 08 0C 0A 43 61 73 61 62 6C 61 6E 63 61 31 U....Casablanca1
0130: 13 30 11 06 03 55 04 07 0C 0A 43 61 73 61 62 6C .0...U....Casabl
0140: 61 6E 63 61 31 11 30 0F 06 03 55 04 0A 0C 08 53 anca1.0...U....S
0150: 6F 66 69 53 6F 66 74 31 11 30 0F 06 03 55 04 0B ofiSoft1.0...U..
0160: 0C 08 73 6F 66 69 73 6F 66 74 31 12 30 10 06 03 ..sofisoft1.0...
0170: 55 04 03 0C 09 6C 6F 63 61 6C 68 6F 73 74 30 81 U....localhost0.
0180: 9F 30 0D 06 09 2A 86 48 86 F7 0D 01 01 01 05 00 .0...*.H........
0190: 03 81 8D 00 30 81 89 02 81 81 00 AF 97 F1 60 18 ....0.........`.
01A0: CC C0 0B 32 DC 81 A4 20 6C 32 D8 15 D9 E1 7D 99 ...2... l2......
01B0: 56 8F 63 ED F7 40 2C 82 39 3C 5C 86 60 63 5C 82 V.c..@,.9<\.`c\.
01C0: BD 07 32 40 58 F0 F2 FE FF 28 A6 35 33 65 62 45 ..2@X....(.53ebE
01D0: 5D 9D 73 66 50 8B F1 47 1A 1D 74 BA 5A 7A 21 C6 ].sfP..G..t.Zz!.
01E0: F2 5D 80 BC D0 A1 0E 0B 92 59 93 A5 B0 9E 12 4F .].......Y.....O
01F0: D9 7F 18 83 C2 40 70 DB 8C BB 47 AE 54 DE 9A 05 .....@p...G.T...
0200: 49 F8 43 29 95 9F 4F 5C B2 D4 6F A1 85 3B 0D FC I.C)..O\..o..;..
0210: 5B FF 05 21 DC 1C 5A 7F 99 1C 8F 02 03 01 00 01 [..!..Z.........
0220: 30 0D 06 09 2A 86 48 86 F7 0D 01 01 0B 05 00 03 0...*.H.........
0230: 81 81 00 18 9A 4A FA 1B 95 C1 93 F2 42 E3 01 B2 .....J......B...
0240: AB 19 66 4B 8D 0B 7C D1 DD DC DF 21 EE 95 E5 70 ..fK.......!...p
0250: CD 9A 6B A3 A4 6E E4 76 80 A9 A2 DF D9 90 0E 11 ..k..n.v........
0260: D9 C6 2D 39 E0 A5 48 E7 D4 0D 38 87 37 1B 73 6D ..-9..H...8.7.sm
0270: B4 39 F9 70 2F 19 B3 C6 C8 17 16 56 5F 33 C3 2D .9.p/......V_3.-
0280: 89 5E 9D 81 F5 79 50 BD 05 E1 59 5F 62 50 55 B1 .^...yP...Y_bPU.
0290: 75 CF 49 E1 36 73 DF 9F DD FB 9D 65 45 2C 0B A1 u.I.6s.....eE,..
02A0: 25 13 FE 5B 16 1D 27 46 E8 74 16 C9 8F FD A3 4D %..[..'F.t.....M
02B0: 9C BE F2 0C 00 00 C9 03 00 17 41 04 74 0B 90 6A ..........A.t..j
02C0: CB F2 40 3A 45 82 AF B1 5A 68 41 AD BC 68 9A E5 ..@:E...ZhA..h..
02D0: 31 44 0D D9 08 CB 80 EC DA DA 85 9F DA D3 6E E4 1D............n.
02E0: FA D3 0E 7C CF 23 FB FB 58 83 34 0E D3 F0 34 26 .....#..X.4...4&
02F0: 6A 0F 3B 3A 72 41 66 CC C3 69 F2 6D 06 01 00 80 j.;:rAf..i.m....
0300: 7C 2F 96 07 2E A2 66 71 95 7F 57 33 D4 6E 1D C2 ./....fq..W3.n..
0310: 34 AD F5 58 73 C3 1E 6C CB 90 86 A4 9E 00 2E 2E 4..Xs..l........
0320: E3 F2 26 40 A8 26 AE AD 33 84 14 93 34 AA 5E D4 ..&@.&..3...4.^.
0330: 88 3C 19 B5 C5 1A 1A 6B F1 04 D3 5B 9D 01 05 10 .<.....k...[....
0340: D7 9B 35 AE 85 A5 E0 19 4D 86 91 DB 6A 6C 3E 65 ..5.....M...jl>e
0350: F8 F5 24 FF 5B 6E 92 93 CB F0 71 9B 8C 5B E4 CD ..$.[n....q..[..
0360: FB A2 E6 DC 14 C2 B2 17 6C 31 79 E2 5D D9 11 B9 ........l1y.]...
0370: 7C A8 35 10 17 E2 95 45 A5 50 46 AE 51 60 19 63 ..5....E.PF.Q`.c
0380: 0E 00 00 00 ....
pool-1-thread-1, WRITE: TLSv1.2 Handshake, length = 900
[Raw write]: length = 905
0000: 16 03 03 03 84 02 00 00 4D 03 03 59 CD 56 2F FB ........M..Y.V/.
0010: 94 8C A9 E3 F9 78 4C F6 26 5A 68 71 95 F3 8E 84 .....xL.&Zhq....
0020: 4E 04 30 24 7B 7D 06 DD 3E 05 88 20 59 CD 56 2F N.0$....>.. Y.V/
0030: 5F D2 0E DF EB F0 3B 38 73 D7 F6 F6 9F 24 20 F3 _.....;8s....$ .
0040: 58 17 3B 35 00 9F E0 46 26 52 F8 C6 C0 13 00 00 X.;5...F&R......
0050: 05 FF 01 00 01 00 0B 00 02 5E 00 02 5B 00 02 58 .........^..[..X
0060: 30 82 02 54 30 82 01 BD 02 04 59 CD 39 CE 30 0D 0..T0.....Y.9.0.
0070: 06 09 2A 86 48 86 F7 0D 01 01 0B 05 00 30 71 31 ..*.H........0q1
0080: 0B 30 09 06 03 55 04 06 13 02 4D 41 31 13 30 11 .0...U....MA1.0.
0090: 06 03 55 04 08 0C 0A 43 61 73 61 62 6C 61 6E 63 ..U....Casablanc
00A0: 61 31 13 30 11 06 03 55 04 07 0C 0A 43 61 73 61 a1.0...U....Casa
00B0: 62 6C 61 6E 63 61 31 11 30 0F 06 03 55 04 0A 0C blanca1.0...U...
00C0: 08 53 6F 66 69 53 6F 66 74 31 11 30 0F 06 03 55 .SofiSoft1.0...U
00D0: 04 0B 0C 08 73 6F 66 69 73 6F 66 74 31 12 30 10 ....sofisoft1.0.
00E0: 06 03 55 04 03 0C 09 6C 6F 63 61 6C 68 6F 73 74 ..U....localhost
00F0: 30 1E 17 0D 31 37 30 39 32 38 31 38 30 35 30 32 0...170928180502
0100: 5A 17 0D 33 37 30 39 32 38 31 38 30 35 30 32 5A Z..370928180502Z
0110: 30 71 31 0B 30 09 06 03 55 04 06 13 02 4D 41 31 0q1.0...U....MA1
0120: 13 30 11 06 03 55 04 08 0C 0A 43 61 73 61 62 6C .0...U....Casabl
0130: 61 6E 63 61 31 13 30 11 06 03 55 04 07 0C 0A 43 anca1.0...U....C
0140: 61 73 61 62 6C 61 6E 63 61 31 11 30 0F 06 03 55 asablanca1.0...U
0150: 04 0A 0C 08 53 6F 66 69 53 6F 66 74 31 11 30 0F ....SofiSoft1.0.
0160: 06 03 55 04 0B 0C 08 73 6F 66 69 73 6F 66 74 31 ..U....sofisoft1
0170: 12 30 10 06 03 55 04 03 0C 09 6C 6F 63 61 6C 68 .0...U....localh
0180: 6F 73 74 30 81 9F 30 0D 06 09 2A 86 48 86 F7 0D ost0..0...*.H...
0190: 01 01 01 05 00 03 81 8D 00 30 81 89 02 81 81 00 .........0......
01A0: AF 97 F1 60 18 CC C0 0B 32 DC 81 A4 20 6C 32 D8 ...`....2... l2.
01B0: 15 D9 E1 7D 99 56 8F 63 ED F7 40 2C 82 39 3C 5C .....V.c..@,.9<\
01C0: 86 60 63 5C 82 BD 07 32 40 58 F0 F2 FE FF 28 A6 .`c\...2@X....(.
01D0: 35 33 65 62 45 5D 9D 73 66 50 8B F1 47 1A 1D 74 53ebE].sfP..G..t
01E0: BA 5A 7A 21 C6 F2 5D 80 BC D0 A1 0E 0B 92 59 93 .Zz!..].......Y.
01F0: A5 B0 9E 12 4F D9 7F 18 83 C2 40 70 DB 8C BB 47 ....O.....@p...G
0200: AE 54 DE 9A 05 49 F8 43 29 95 9F 4F 5C B2 D4 6F .T...I.C)..O\..o
0210: A1 85 3B 0D FC 5B FF 05 21 DC 1C 5A 7F 99 1C 8F ..;..[..!..Z....
0220: 02 03 01 00 01 30 0D 06 09 2A 86 48 86 F7 0D 01 .....0...*.H....
0230: 01 0B 05 00 03 81 81 00 18 9A 4A FA 1B 95 C1 93 ..........J.....
0240: F2 42 E3 01 B2 AB 19 66 4B 8D 0B 7C D1 DD DC DF .B.....fK.......
0250: 21 EE 95 E5 70 CD 9A 6B A3 A4 6E E4 76 80 A9 A2 !...p..k..n.v...
0260: DF D9 90 0E 11 D9 C6 2D 39 E0 A5 48 E7 D4 0D 38 .......-9..H...8
0270: 87 37 1B 73 6D B4 39 F9 70 2F 19 B3 C6 C8 17 16 .7.sm.9.p/......
0280: 56 5F 33 C3 2D 89 5E 9D 81 F5 79 50 BD 05 E1 59 V_3.-.^...yP...Y
0290: 5F 62 50 55 B1 75 CF 49 E1 36 73 DF 9F DD FB 9D _bPU.u.I.6s.....
02A0: 65 45 2C 0B A1 25 13 FE 5B 16 1D 27 46 E8 74 16 eE,..%..[..'F.t.
02B0: C9 8F FD A3 4D 9C BE F2 0C 00 00 C9 03 00 17 41 ....M..........A
02C0: 04 74 0B 90 6A CB F2 40 3A 45 82 AF B1 5A 68 41 .t..j..@:E...ZhA
02D0: AD BC 68 9A E5 31 44 0D D9 08 CB 80 EC DA DA 85 ..h..1D.........
02E0: 9F DA D3 6E E4 FA D3 0E 7C CF 23 FB FB 58 83 34 ...n......#..X.4
02F0: 0E D3 F0 34 26 6A 0F 3B 3A 72 41 66 CC C3 69 F2 ...4&j.;:rAf..i.
0300: 6D 06 01 00 80 7C 2F 96 07 2E A2 66 71 95 7F 57 m...../....fq..W
0310: 33 D4 6E 1D C2 34 AD F5 58 73 C3 1E 6C CB 90 86 3.n..4..Xs..l...
0320: A4 9E 00 2E 2E E3 F2 26 40 A8 26 AE AD 33 84 14 .......&@.&..3..
0330: 93 34 AA 5E D4 88 3C 19 B5 C5 1A 1A 6B F1 04 D3 .4.^..<.....k...
0340: 5B 9D 01 05 10 D7 9B 35 AE 85 A5 E0 19 4D 86 91 [......5.....M..
0350: DB 6A 6C 3E 65 F8 F5 24 FF 5B 6E 92 93 CB F0 71 .jl>e..$.[n....q
0360: 9B 8C 5B E4 CD FB A2 E6 DC 14 C2 B2 17 6C 31 79 ..[..........l1y
0370: E2 5D D9 11 B9 7C A8 35 10 17 E2 95 45 A5 50 46 .].....5....E.PF
0380: AE 51 60 19 63 0E 00 00 00 .Q`.c....
[Raw read]: length = 5
0000: 16 03 03 00 46 ....F
[Raw read]: length = 70
0000: 10 00 00 42 41 04 BC 36 73 84 B4 0F DB 75 20 36 ...BA..6s....u 6
0010: FE 62 5A 2C 90 2A DF D2 AB B5 7E B2 4E 9E 6C 28 .bZ,.*......N.l(
0020: 83 92 2A 69 28 49 BD 21 5C 4C 9D 18 AF E6 06 80 ..*i(I.!\L......
0030: AA 7F 19 42 F2 B5 D7 64 9E 1A 2C ED F1 17 0D D3 ...B...d..,.....
0040: 2B 6B 22 7B 6E 47 +k".nG
WebsocketSelector10, READ: TLSv1.2 Handshake, length = 70
*** ECDHClientKeyExchange
ECDH Public value: { 4, 188, 54, 115, 132, 180, 15, 219, 117, 32, 54, 254, 98, 90, 44, 144, 42, 223, 210, 171, 181, 126, 178, 78, 158, 108, 40, 131, 146, 42, 105, 40, 73, 189, 33, 92, 76, 157, 24, 175, 230, 6, 128, 170, 127, 25, 66, 242, 181, 215, 100, 158, 26, 44, 237, 241, 23, 13, 211, 43, 107, 34, 123, 110, 71 }
SESSION KEYGEN:
PreMaster Secret:
0000: 9F F5 E0 E8 E6 EC 5E CB EC C7 A1 7F 87 C7 91 31 ......^........1
0010: 49 52 AA AB D2 07 CF AD A3 66 A6 19 3E DE 1A D7 IR.......f..>...
CONNECTION KEYGEN:
Client Nonce:
0000: 2C 4C 01 A8 42 E9 1A 85 90 08 EF 03 B2 DB 35 3F ,L..B.........5?
0010: F1 15 E6 B2 54 45 86 67 16 3A D6 4C 43 04 67 05 ....TE.g.:.LC.g.
Server Nonce:
0000: 59 CD 56 2F FB 94 8C A9 E3 F9 78 4C F6 26 5A 68 Y.V/......xL.&Zh
0010: 71 95 F3 8E 84 4E 04 30 24 7B 7D 06 DD 3E 05 88 q....N.0$....>..
Master Secret:
0000: 2C 77 2A 44 9B 5F D3 D7 51 49 7E 0D 74 91 35 46 ,w*D._..QI..t.5F
0010: DB 0D 36 4F 52 E8 E9 BF 79 90 4C AF 9E 10 89 6B ..6OR...y.L....k
0020: 9E 63 5E 92 A3 81 36 EF 1A F0 71 9E FB 1B 62 9C .c^...6...q...b.
Client MAC write Secret:
0000: EA 58 3C 29 27 28 6E F8 2B F6 E5 53 19 A2 DF 6C .X<)'(n.+..S...l
0010: 7A FF BB 06 z...
Server MAC write Secret:
0000: 50 C1 BE 42 D6 2D 70 AC 1B 71 98 76 70 14 E6 C5 P..B.-p..q.vp...
0010: 8A 8C A0 82 ....
Client write key:
0000: 88 7E 29 EC 5F 3A 12 29 99 E1 73 1C 66 E5 94 07 ..)._:.)..s.f...
Server write key:
0000: 9B 03 CE F6 2B 44 18 30 A7 28 F2 B8 24 13 4C E1 ....+D.0.(..$.L.
... no IV derived for this protocol
[read] MD5 and SHA1 hashes: len = 70
0000: 10 00 00 42 41 04 BC 36 73 84 B4 0F DB 75 20 36 ...BA..6s....u 6
0010: FE 62 5A 2C 90 2A DF D2 AB B5 7E B2 4E 9E 6C 28 .bZ,.*......N.l(
0020: 83 92 2A 69 28 49 BD 21 5C 4C 9D 18 AF E6 06 80 ..*i(I.!\L......
0030: AA 7F 19 42 F2 B5 D7 64 9E 1A 2C ED F1 17 0D D3 ...B...d..,.....
0040: 2B 6B 22 7B 6E 47 +k".nG
[Raw read]: length = 5
0000: 14 03 03 00 01 .....
[Raw read]: length = 1
0000: 01 .
WebsocketSelector10, READ: TLSv1.2 Change Cipher Spec, length = 1
[Raw read]: length = 5
0000: 16 03 03 00 40 ....@
[Raw read]: length = 64
0000: 59 15 AA A7 EE D8 63 BF 0E BF 5D B5 60 41 82 B4 Y.....c...].`A..
0010: 06 E7 9B B6 06 CC 07 FA 91 0B B4 BE DC 45 11 3A .............E.:
0020: 52 18 62 DD 74 EA D7 6E B3 2F B5 39 B6 1A E3 71 R.b.t..n./.9...q
0030: AE 89 6C DE 50 D9 2D 36 3F 72 A0 88 76 47 90 A2 ..l.P.-6?r..vG..
WebsocketSelector10, READ: TLSv1.2 Handshake, length = 64
Padded plaintext after DECRYPTION: len = 64
0000: E4 B1 B6 FB 45 AF A1 F9 45 82 89 97 98 1B 31 FB ....E...E.....1.
0010: 14 00 00 0C 91 57 D0 5A 14 58 14 54 62 9B 07 33 .....W.Z.X.Tb..3
0020: A9 47 4B C6 9A 80 99 8A 3E 00 81 A7 F2 6D BA B4 .GK.....>....m..
0030: 77 3A B3 59 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B w:.Y............
*** Finished
verify_data: { 145, 87, 208, 90, 20, 88, 20, 84, 98, 155, 7, 51 }
***
[read] MD5 and SHA1 hashes: len = 16
0000: 14 00 00 0C 91 57 D0 5A 14 58 14 54 62 9B 07 33 .....W.Z.X.Tb..3
WebsocketSelector10, WRITE: TLSv1.2 Change Cipher Spec, length = 1
*** Finished
verify_data: { 191, 56, 77, 229, 33, 89, 94, 221, 16, 41, 237, 2 }
***
[write] MD5 and SHA1 hashes: len = 16
0000: 14 00 00 0C BF 38 4D E5 21 59 5E DD 10 29 ED 02 .....8M.!Y^..)..
Padded plaintext before ENCRYPTION: len = 64
0000: 7B 33 C8 DD 26 B5 80 0F B3 E5 39 D2 07 2C 3E D3 .3..&.....9..,>.
0010: 14 00 00 0C BF 38 4D E5 21 59 5E DD 10 29 ED 02 .....8M.!Y^..)..
0020: 70 D1 25 4F 86 7C D5 15 5F 92 73 D1 45 14 7F 54 p.%O...._.s.E..T
0030: A3 4F D5 D9 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B .O..............
WebsocketSelector10, WRITE: TLSv1.2 Handshake, length = 64
%% Cached server session: [Session-1, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA]
[Raw write]: length = 6
0000: 14 03 03 00 01 01 ......
[Raw write]: length = 69
0000: 16 03 03 00 40 28 2E D7 77 B7 62 8E D5 E4 87 F8 ....@(..w.b.....
0010: E1 AF 25 B6 93 50 38 D6 41 27 44 10 5D BA A0 3E ..%..P8.A'D.]..>
0020: A5 C3 BC F1 2C 06 3A 60 53 80 41 AB 3A 31 8D B9 ....,.:`S.A.:1..
0030: 41 BA C6 5D 96 A8 02 FC BF 9A C4 A1 56 34 0D AE A..]........V4..
0040: 7B E1 3B C2 FD ..;..
WebsocketSelector10, called closeOutbound()
WebsocketSelector10, closeOutboundInternal()
WebsocketSelector10, SEND TLSv1.2 ALERT: warning, description = close_notify
Padded plaintext before ENCRYPTION: len = 48
0000: 4A B4 44 C2 F7 5D BE EF EF 06 6B 4F F1 B3 D4 27 J.D..]....kO...'
0010: 01 00 7B B1 B5 1E D1 A1 D2 AA 96 6A 13 8E 64 B8 ...........j..d.
0020: 87 12 4C A3 80 C7 09 09 09 09 09 09 09 09 09 09 ..L.............
WebsocketSelector10, WRITE: TLSv1.2 Alert, length = 48
%% Invalidated: [Session-1, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA]
[Raw write]: length = 53
0000: 15 03 03 00 30 BD C8 EB 11 6C 9D 16 72 EE 17 98 ....0....l..r...
0010: 1A 80 60 C1 C0 E2 EA 73 DE C1 09 2C BC EE 9F B2 ..`....s...,....
0020: B9 20 EC 34 76 08 92 EB BE 7B C6 A4 BB 7D F8 B9 . .4v...........
0030: E8 A7 6C 33 6A ..l3j
Removing connection which is not in the connections collection! Possible no handshake recieved! org.java_websocket.WebSocketImpl@b088f8
Using SSLEngineImpl.
Ignoring unavailable cipher suite: TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Ignoring unavailable cipher suite: TLS_DHE_RSA_WITH_AES_256_CBC_SHA
Ignoring unavailable cipher suite: TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
Ignoring unavailable cipher suite: TLS_DHE_DSS_WITH_AES_256_CBC_SHA256
Ignoring unavailable cipher suite: TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Ignoring unavailable cipher suite: TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
Ignoring unavailable cipher suite: TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
Ignoring unavailable cipher suite: TLS_RSA_WITH_AES_256_CBC_SHA256
Ignoring unavailable cipher suite: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
Ignoring unavailable cipher suite: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
Ignoring unavailable cipher suite: TLS_DHE_DSS_WITH_AES_256_CBC_SHA
Ignoring unavailable cipher suite: TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
Ignoring unavailable cipher suite: TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
Ignoring unavailable cipher suite: TLS_RSA_WITH_AES_256_CBC_SHA
Allow unsafe renegotiation: false
Allow legacy hello messages: true
Is initial handshake: true
Is secure renegotiation: false
[Raw read]: length = 5
0000: 16 03 01 00 D5 .....
[Raw read]: length = 213
0000: 01 00 00 D1 03 03 40 43 3E 4C 83 F1 61 03 12 96 ......@C>L..a...
0010: 6B 3C E3 70 EF 04 5A E6 0C AE B0 37 7A 87 DE B5 k<.p..Z....7z...
0020: 53 10 24 DE 42 71 20 59 CD 56 2F 5F D2 0E DF EB S.$.Bq Y.V/_....
0030: F0 3B 38 73 D7 F6 F6 9F 24 20 F3 58 17 3B 35 00 .;8s....$ .X.;5.
0040: 9F E0 46 26 52 F8 C6 00 18 C0 2B C0 2F C0 2C C0 ..F&R.....+./.,.
0050: 30 C0 13 C0 14 00 9C 00 9D 00 2F 00 35 00 0A 00 0........./.5...
0060: FF 01 00 00 70 00 00 00 0E 00 0C 00 00 09 6C 6F ....p.........lo
0070: 63 61 6C 68 6F 73 74 00 0B 00 04 03 00 01 02 00 calhost.........
0080: 0A 00 1C 00 1A 00 17 00 19 00 1C 00 1B 00 18 00 ................
0090: 1A 00 16 00 0E 00 0D 00 0B 00 0C 00 09 00 0A 00 ................
00A0: 23 00 00 00 0D 00 20 00 1E 06 01 06 02 06 03 05 #..... .........
00B0: 01 05 02 05 03 04 01 04 02 04 03 03 01 03 02 03 ................
00C0: 03 02 01 02 02 02 03 00 05 00 05 01 00 00 00 00 ................
00D0: 00 0F 00 01 01 .....
WebsocketSelector10, READ: TLSv1 Handshake, length = 213
*** ClientHello, TLSv1.2
RandomCookie: GMT: 1078148684 bytes = { 131, 241, 97, 3, 18, 150, 107, 60, 227, 112, 239, 4, 90, 230, 12, 174, 176, 55, 122, 135, 222, 181, 83, 16, 36, 222, 66, 113 }
Session ID: {89, 205, 86, 47, 95, 210, 14, 223, 235, 240, 59, 56, 115, 215, 246, 246, 159, 36, 32, 243, 88, 23, 59, 53, 0, 159, 224, 70, 38, 82, 248, 198}
Cipher Suites: [TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_GCM_SHA384, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, TLS_EMPTY_RENEGOTIATION_INFO_SCSV]
Compression Methods: { 0 }
Extension server_name, server_name: [host_name: localhost]
Extension ec_point_formats, formats: [uncompressed, ansiX962_compressed_prime, ansiX962_compressed_char2]
Extension elliptic_curves, curve names: {secp256r1, secp521r1, unknown curve 28, unknown curve 27, secp384r1, unknown curve 26, secp256k1, sect571r1, sect571k1, sect409k1, sect409r1, sect283k1, sect283r1}
Unsupported extension type_35, data:
Extension signature_algorithms, signature_algorithms: SHA512withRSA, Unknown (hash:0x6, signature:0x2), SHA512withECDSA, SHA384withRSA, Unknown (hash:0x5, signature:0x2), SHA384withECDSA, SHA256withRSA, Unknown (hash:0x4, signature:0x2), SHA256withECDSA, SHA224withRSA, Unknown (hash:0x3, signature:0x2), SHA224withECDSA, SHA1withRSA, SHA1withDSA, SHA1withECDSA
Unsupported extension status_request, data: 01:00:00:00:00
Unsupported extension type_15, data: 01
***
[read] MD5 and SHA1 hashes: len = 213
0000: 01 00 00 D1 03 03 40 43 3E 4C 83 F1 61 03 12 96 ......@C>L..a...
0010: 6B 3C E3 70 EF 04 5A E6 0C AE B0 37 7A 87 DE B5 k<.p..Z....7z...
0020: 53 10 24 DE 42 71 20 59 CD 56 2F 5F D2 0E DF EB S.$.Bq Y.V/_....
0030: F0 3B 38 73 D7 F6 F6 9F 24 20 F3 58 17 3B 35 00 .;8s....$ .X.;5.
0040: 9F E0 46 26 52 F8 C6 00 18 C0 2B C0 2F C0 2C C0 ..F&R.....+./.,.
0050: 30 C0 13 C0 14 00 9C 00 9D 00 2F 00 35 00 0A 00 0........./.5...
0060: FF 01 00 00 70 00 00 00 0E 00 0C 00 00 09 6C 6F ....p.........lo
0070: 63 61 6C 68 6F 73 74 00 0B 00 04 03 00 01 02 00 calhost.........
0080: 0A 00 1C 00 1A 00 17 00 19 00 1C 00 1B 00 18 00 ................
0090: 1A 00 16 00 0E 00 0D 00 0B 00 0C 00 09 00 0A 00 ................
00A0: 23 00 00 00 0D 00 20 00 1E 06 01 06 02 06 03 05 #..... .........
00B0: 01 05 02 05 03 04 01 04 02 04 03 03 01 03 02 03 ................
00C0: 03 02 01 02 02 02 03 00 05 00 05 01 00 00 00 00 ................
00D0: 00 0F 00 01 01 .....
%% Initialized: [Session-2, SSL_NULL_WITH_NULL_NULL]
%% Negotiating: [Session-2, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA]
*** ServerHello, TLSv1.2
RandomCookie: GMT: 1489851991 bytes = { 54, 92, 192, 20, 121, 193, 6, 55, 213, 66, 74, 119, 73, 82, 155, 254, 182, 149, 41, 220, 185, 22, 161, 95, 47, 234, 239, 68 }
Session ID: {89, 205, 86, 87, 193, 232, 75, 99, 29, 129, 52, 196, 235, 105, 17, 156, 218, 248, 109, 163, 110, 240, 108, 154, 170, 159, 248, 179, 3, 117, 166, 50}
Cipher Suite: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
Compression Method: 0
Extension renegotiation_info, renegotiated_connection: <empty>
***
Cipher suite: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
*** Certificate chain
chain [0] = [
[
Version: V1
Subject: CN=localhost, OU=sofisoft, O=SofiSoft, L=Casablanca, ST=Casablanca, C=MA
Signature Algorithm: SHA256withRSA, OID = 1.2.840.113549.1.1.11
Key: Sun RSA public key, 1024 bits
modulus: 123305967866127895135250096688235484937121945450718380358917371399124253346709386004466389104242421166360785344280077222004077082809461310900467735014154077261856903926817905422244941920913784967092867528081733933790245573579176596115386851419936178686024588398583026693226855371939187095372462213116070534287
public exponent: 65537
Validity: [From: Thu Sep 28 18:05:02 WET 2017,
To: Mon Sep 28 18:05:02 WET 2037]
Issuer: CN=localhost, OU=sofisoft, O=SofiSoft, L=Casablanca, ST=Casablanca, C=MA
SerialNumber: [ 59cd39ce]
]
Algorithm: [SHA256withRSA]
Signature:
0000: 18 9A 4A FA 1B 95 C1 93 F2 42 E3 01 B2 AB 19 66 ..J......B.....f
0010: 4B 8D 0B 7C D1 DD DC DF 21 EE 95 E5 70 CD 9A 6B K.......!...p..k
0020: A3 A4 6E E4 76 80 A9 A2 DF D9 90 0E 11 D9 C6 2D ..n.v..........-
0030: 39 E0 A5 48 E7 D4 0D 38 87 37 1B 73 6D B4 39 F9 9..H...8.7.sm.9.
0040: 70 2F 19 B3 C6 C8 17 16 56 5F 33 C3 2D 89 5E 9D p/......V_3.-.^.
0050: 81 F5 79 50 BD 05 E1 59 5F 62 50 55 B1 75 CF 49 ..yP...Y_bPU.u.I
0060: E1 36 73 DF 9F DD FB 9D 65 45 2C 0B A1 25 13 FE .6s.....eE,..%..
0070: 5B 16 1D 27 46 E8 74 16 C9 8F FD A3 4D 9C BE F2 [..'F.t.....M...
]
***
*** ECDH ServerKeyExchange
Signature Algorithm SHA512withRSA
Server key: Sun EC public key, 256 bits
public x coord: 36941648318746369457941347383736441162232106962031852121937859848604368276791
public y coord: 12284987792728277363487466181498544521700072922644701877249081074698722022511
parameters: secp256r1 [NIST P-256, X9.62 prime256v1] (1.2.840.10045.3.1.7)
*** ServerHelloDone
[write] MD5 and SHA1 hashes: len = 900
0000: 02 00 00 4D 03 03 59 CD 56 57 36 5C C0 14 79 C1 ...M..Y.VW6\..y.
0010: 06 37 D5 42 4A 77 49 52 9B FE B6 95 29 DC B9 16 .7.BJwIR....)...
0020: A1 5F 2F EA EF 44 20 59 CD 56 57 C1 E8 4B 63 1D ._/..D Y.VW..Kc.
0030: 81 34 C4 EB 69 11 9C DA F8 6D A3 6E F0 6C 9A AA .4..i....m.n.l..
0040: 9F F8 B3 03 75 A6 32 C0 13 00 00 05 FF 01 00 01 ....u.2.........
0050: 00 0B 00 02 5E 00 02 5B 00 02 58 30 82 02 54 30 ....^..[..X0..T0
0060: 82 01 BD 02 04 59 CD 39 CE 30 0D 06 09 2A 86 48 .....Y.9.0...*.H
0070: 86 F7 0D 01 01 0B 05 00 30 71 31 0B 30 09 06 03 ........0q1.0...
0080: 55 04 06 13 02 4D 41 31 13 30 11 06 03 55 04 08 U....MA1.0...U..
0090: 0C 0A 43 61 73 61 62 6C 61 6E 63 61 31 13 30 11 ..Casablanca1.0.
00A0: 06 03 55 04 07 0C 0A 43 61 73 61 62 6C 61 6E 63 ..U....Casablanc
00B0: 61 31 11 30 0F 06 03 55 04 0A 0C 08 53 6F 66 69 a1.0...U....Sofi
00C0: 53 6F 66 74 31 11 30 0F 06 03 55 04 0B 0C 08 73 Soft1.0...U....s
00D0: 6F 66 69 73 6F 66 74 31 12 30 10 06 03 55 04 03 ofisoft1.0...U..
00E0: 0C 09 6C 6F 63 61 6C 68 6F 73 74 30 1E 17 0D 31 ..localhost0...1
00F0: 37 30 39 32 38 31 38 30 35 30 32 5A 17 0D 33 37 70928180502Z..37
0100: 30 39 32 38 31 38 30 35 30 32 5A 30 71 31 0B 30 0928180502Z0q1.0
0110: 09 06 03 55 04 06 13 02 4D 41 31 13 30 11 06 03 ...U....MA1.0...
0120: 55 04 08 0C 0A 43 61 73 61 62 6C 61 6E 63 61 31 U....Casablanca1
0130: 13 30 11 06 03 55 04 07 0C 0A 43 61 73 61 62 6C .0...U....Casabl
0140: 61 6E 63 61 31 11 30 0F 06 03 55 04 0A 0C 08 53 anca1.0...U....S
0150: 6F 66 69 53 6F 66 74 31 11 30 0F 06 03 55 04 0B ofiSoft1.0...U..
0160: 0C 08 73 6F 66 69 73 6F 66 74 31 12 30 10 06 03 ..sofisoft1.0...
0170: 55 04 03 0C 09 6C 6F 63 61 6C 68 6F 73 74 30 81 U....localhost0.
0180: 9F 30 0D 06 09 2A 86 48 86 F7 0D 01 01 01 05 00 .0...*.H........
0190: 03 81 8D 00 30 81 89 02 81 81 00 AF 97 F1 60 18 ....0.........`.
01A0: CC C0 0B 32 DC 81 A4 20 6C 32 D8 15 D9 E1 7D 99 ...2... l2......
01B0: 56 8F 63 ED F7 40 2C 82 39 3C 5C 86 60 63 5C 82 V.c..@,.9<\.`c\.
01C0: BD 07 32 40 58 F0 F2 FE FF 28 A6 35 33 65 62 45 ..2@X....(.53ebE
01D0: 5D 9D 73 66 50 8B F1 47 1A 1D 74 BA 5A 7A 21 C6 ].sfP..G..t.Zz!.
01E0: F2 5D 80 BC D0 A1 0E 0B 92 59 93 A5 B0 9E 12 4F .].......Y.....O
01F0: D9 7F 18 83 C2 40 70 DB 8C BB 47 AE 54 DE 9A 05 .....@p...G.T...
0200: 49 F8 43 29 95 9F 4F 5C B2 D4 6F A1 85 3B 0D FC I.C)..O\..o..;..
0210: 5B FF 05 21 DC 1C 5A 7F 99 1C 8F 02 03 01 00 01 [..!..Z.........
0220: 30 0D 06 09 2A 86 48 86 F7 0D 01 01 0B 05 00 03 0...*.H.........
0230: 81 81 00 18 9A 4A FA 1B 95 C1 93 F2 42 E3 01 B2 .....J......B...
0240: AB 19 66 4B 8D 0B 7C D1 DD DC DF 21 EE 95 E5 70 ..fK.......!...p
0250: CD 9A 6B A3 A4 6E E4 76 80 A9 A2 DF D9 90 0E 11 ..k..n.v........
0260: D9 C6 2D 39 E0 A5 48 E7 D4 0D 38 87 37 1B 73 6D ..-9..H...8.7.sm
0270: B4 39 F9 70 2F 19 B3 C6 C8 17 16 56 5F 33 C3 2D .9.p/......V_3.-
0280: 89 5E 9D 81 F5 79 50 BD 05 E1 59 5F 62 50 55 B1 .^...yP...Y_bPU.
0290: 75 CF 49 E1 36 73 DF 9F DD FB 9D 65 45 2C 0B A1 u.I.6s.....eE,..
02A0: 25 13 FE 5B 16 1D 27 46 E8 74 16 C9 8F FD A3 4D %..[..'F.t.....M
02B0: 9C BE F2 0C 00 00 C9 03 00 17 41 04 51 AC 3B 63 ..........A.Q.;c
02C0: 9A B0 91 AC 1B B2 3A B9 93 10 28 C4 21 59 48 A4 ......:...(.!YH.
02D0: E2 54 FD 28 61 3B 97 FA 52 A0 8D 37 1B 29 0E 82 .T.(a;..R..7.)..
02E0: D1 AE F9 7D 83 F8 C8 8D FA F8 E2 3F B4 BC C2 6E ...........?...n
02F0: B3 AD 18 30 39 4E FF 3F C0 FD 14 6F 06 01 00 80 ...09N.?...o....
0300: 12 1D 9C F3 6F 67 BB 81 BA 92 B0 16 38 16 7D 9F ....og......8...
0310: 42 F3 BC 16 72 4D FC 58 7D 39 8E F8 46 7D 66 55 B...rM.X.9..F.fU
0320: 24 D1 2A C1 F5 60 8A AC 4B CC 7C E5 F3 C7 C9 31 $.*..`..K......1
0330: 3C D4 B4 80 01 C7 CF 2C EB 94 D0 59 27 42 3D 5D <......,...Y'B=]
0340: E2 09 76 98 4A BD B1 4B 5A 3D 36 D3 53 E8 D4 B2 ..v.J..KZ=6.S...
0350: E2 AC 69 97 93 71 E5 97 3A B3 C1 2C FE 41 85 E0 ..i..q..:..,.A..
0360: FC B1 71 58 6B 87 4A 97 09 76 DB 85 E8 9C 0D 9A ..qXk.J..v......
0370: 6B 62 69 A1 56 21 5C 3B 8B C8 1C 35 73 CB AB 09 kbi.V!\;...5s...
0380: 0E 00 00 00 ....
pool-1-thread-1, WRITE: TLSv1.2 Handshake, length = 900
[Raw write]: length = 905
0000: 16 03 03 03 84 02 00 00 4D 03 03 59 CD 56 57 36 ........M..Y.VW6
0010: 5C C0 14 79 C1 06 37 D5 42 4A 77 49 52 9B FE B6 \..y..7.BJwIR...
0020: 95 29 DC B9 16 A1 5F 2F EA EF 44 20 59 CD 56 57 .)...._/..D Y.VW
0030: C1 E8 4B 63 1D 81 34 C4 EB 69 11 9C DA F8 6D A3 ..Kc..4..i....m.
0040: 6E F0 6C 9A AA 9F F8 B3 03 75 A6 32 C0 13 00 00 n.l......u.2....
0050: 05 FF 01 00 01 00 0B 00 02 5E 00 02 5B 00 02 58 .........^..[..X
0060: 30 82 02 54 30 82 01 BD 02 04 59 CD 39 CE 30 0D 0..T0.....Y.9.0.
0070: 06 09 2A 86 48 86 F7 0D 01 01 0B 05 00 30 71 31 ..*.H........0q1
0080: 0B 30 09 06 03 55 04 06 13 02 4D 41 31 13 30 11 .0...U....MA1.0.
0090: 06 03 55 04 08 0C 0A 43 61 73 61 62 6C 61 6E 63 ..U....Casablanc
00A0: 61 31 13 30 11 06 03 55 04 07 0C 0A 43 61 73 61 a1.0...U....Casa
00B0: 62 6C 61 6E 63 61 31 11 30 0F 06 03 55 04 0A 0C blanca1.0...U...
00C0: 08 53 6F 66 69 53 6F 66 74 31 11 30 0F 06 03 55 .SofiSoft1.0...U
00D0: 04 0B 0C 08 73 6F 66 69 73 6F 66 74 31 12 30 10 ....sofisoft1.0.
00E0: 06 03 55 04 03 0C 09 6C 6F 63 61 6C 68 6F 73 74 ..U....localhost
00F0: 30 1E 17 0D 31 37 30 39 32 38 31 38 30 35 30 32 0...170928180502
0100: 5A 17 0D 33 37 30 39 32 38 31 38 30 35 30 32 5A Z..370928180502Z
0110: 30 71 31 0B 30 09 06 03 55 04 06 13 02 4D 41 31 0q1.0...U....MA1
0120: 13 30 11 06 03 55 04 08 0C 0A 43 61 73 61 62 6C .0...U....Casabl
0130: 61 6E 63 61 31 13 30 11 06 03 55 04 07 0C 0A 43 anca1.0...U....C
0140: 61 73 61 62 6C 61 6E 63 61 31 11 30 0F 06 03 55 asablanca1.0...U
0150: 04 0A 0C 08 53 6F 66 69 53 6F 66 74 31 11 30 0F ....SofiSoft1.0.
0160: 06 03 55 04 0B 0C 08 73 6F 66 69 73 6F 66 74 31 ..U....sofisoft1
0170: 12 30 10 06 03 55 04 03 0C 09 6C 6F 63 61 6C 68 .0...U....localh
0180: 6F 73 74 30 81 9F 30 0D 06 09 2A 86 48 86 F7 0D ost0..0...*.H...
0190: 01 01 01 05 00 03 81 8D 00 30 81 89 02 81 81 00 .........0......
01A0: AF 97 F1 60 18 CC C0 0B 32 DC 81 A4 20 6C 32 D8 ...`....2... l2.
01B0: 15 D9 E1 7D 99 56 8F 63 ED F7 40 2C 82 39 3C 5C .....V.c..@,.9<\
01C0: 86 60 63 5C 82 BD 07 32 40 58 F0 F2 FE FF 28 A6 .`c\...2@X....(.
01D0: 35 33 65 62 45 5D 9D 73 66 50 8B F1 47 1A 1D 74 53ebE].sfP..G..t
01E0: BA 5A 7A 21 C6 F2 5D 80 BC D0 A1 0E 0B 92 59 93 .Zz!..].......Y.
01F0: A5 B0 9E 12 4F D9 7F 18 83 C2 40 70 DB 8C BB 47 ....O.....@p...G
0200: AE 54 DE 9A 05 49 F8 43 29 95 9F 4F 5C B2 D4 6F .T...I.C)..O\..o
0210: A1 85 3B 0D FC 5B FF 05 21 DC 1C 5A 7F 99 1C 8F ..;..[..!..Z....
0220: 02 03 01 00 01 30 0D 06 09 2A 86 48 86 F7 0D 01 .....0...*.H....
0230: 01 0B 05 00 03 81 81 00 18 9A 4A FA 1B 95 C1 93 ..........J.....
0240: F2 42 E3 01 B2 AB 19 66 4B 8D 0B 7C D1 DD DC DF .B.....fK.......
0250: 21 EE 95 E5 70 CD 9A 6B A3 A4 6E E4 76 80 A9 A2 !...p..k..n.v...
0260: DF D9 90 0E 11 D9 C6 2D 39 E0 A5 48 E7 D4 0D 38 .......-9..H...8
0270: 87 37 1B 73 6D B4 39 F9 70 2F 19 B3 C6 C8 17 16 .7.sm.9.p/......
0280: 56 5F 33 C3 2D 89 5E 9D 81 F5 79 50 BD 05 E1 59 V_3.-.^...yP...Y
0290: 5F 62 50 55 B1 75 CF 49 E1 36 73 DF 9F DD FB 9D _bPU.u.I.6s.....
02A0: 65 45 2C 0B A1 25 13 FE 5B 16 1D 27 46 E8 74 16 eE,..%..[..'F.t.
02B0: C9 8F FD A3 4D 9C BE F2 0C 00 00 C9 03 00 17 41 ....M..........A
02C0: 04 51 AC 3B 63 9A B0 91 AC 1B B2 3A B9 93 10 28 .Q.;c......:...(
02D0: C4 21 59 48 A4 E2 54 FD 28 61 3B 97 FA 52 A0 8D .!YH..T.(a;..R..
02E0: 37 1B 29 0E 82 D1 AE F9 7D 83 F8 C8 8D FA F8 E2 7.).............
02F0: 3F B4 BC C2 6E B3 AD 18 30 39 4E FF 3F C0 FD 14 ?...n...09N.?...
0300: 6F 06 01 00 80 12 1D 9C F3 6F 67 BB 81 BA 92 B0 o........og.....
0310: 16 38 16 7D 9F 42 F3 BC 16 72 4D FC 58 7D 39 8E .8...B...rM.X.9.
0320: F8 46 7D 66 55 24 D1 2A C1 F5 60 8A AC 4B CC 7C .F.fU$.*..`..K..
0330: E5 F3 C7 C9 31 3C D4 B4 80 01 C7 CF 2C EB 94 D0 ....1<......,...
0340: 59 27 42 3D 5D E2 09 76 98 4A BD B1 4B 5A 3D 36 Y'B=]..v.J..KZ=6
0350: D3 53 E8 D4 B2 E2 AC 69 97 93 71 E5 97 3A B3 C1 .S.....i..q..:..
0360: 2C FE 41 85 E0 FC B1 71 58 6B 87 4A 97 09 76 DB ,.A....qXk.J..v.
0370: 85 E8 9C 0D 9A 6B 62 69 A1 56 21 5C 3B 8B C8 1C .....kbi.V!\;...
0380: 35 73 CB AB 09 0E 00 00 00 5s.......
[Raw read]: length = 5
0000: 16 03 03 00 46 ....F
[Raw read]: length = 70
0000: 10 00 00 42 41 04 01 E3 93 26 01 D2 8C 84 C0 09 ...BA....&......
0010: 3A 87 46 16 16 96 CC DC 5E 6A 97 C4 70 35 E8 C4 :.F.....^j..p5..
0020: 22 66 26 59 D8 4F 28 F8 1D 6B BA 88 F9 89 6A 0D "f&Y.O(..k....j.
0030: 7E 6B 34 78 77 0D 29 9A 40 C3 C2 76 83 28 3D 27 .k4xw.).@..v.(='
0040: C2 FE 6B 9C 37 F2 ..k.7.
WebsocketSelector10, READ: TLSv1.2 Handshake, length = 70
*** ECDHClientKeyExchange
ECDH Public value: { 4, 1, 227, 147, 38, 1, 210, 140, 132, 192, 9, 58, 135, 70, 22, 22, 150, 204, 220, 94, 106, 151, 196, 112, 53, 232, 196, 34, 102, 38, 89, 216, 79, 40, 248, 29, 107, 186, 136, 249, 137, 106, 13, 126, 107, 52, 120, 119, 13, 41, 154, 64, 195, 194, 118, 131, 40, 61, 39, 194, 254, 107, 156, 55, 242 }
SESSION KEYGEN:
PreMaster Secret:
0000: 63 5E 93 DD 82 BE 1A 5B 45 A6 9D 7F 5C CC 9D AD c^.....[E...\...
0010: F8 8F DB B5 28 08 F4 81 14 AD A5 1D BA 79 3C DF ....(........y<.
CONNECTION KEYGEN:
Client Nonce:
0000: 40 43 3E 4C 83 F1 61 03 12 96 6B 3C E3 70 EF 04 @C>L..a...k<.p..
0010: 5A E6 0C AE B0 37 7A 87 DE B5 53 10 24 DE 42 71 Z....7z...S.$.Bq
Server Nonce:
0000: 59 CD 56 57 36 5C C0 14 79 C1 06 37 D5 42 4A 77 Y.VW6\..y..7.BJw
0010: 49 52 9B FE B6 95 29 DC B9 16 A1 5F 2F EA EF 44 IR....)...._/..D
Master Secret:
0000: D1 07 8B 5F B3 40 BA 01 14 64 97 D8 1F 17 AB 87 ..._.@...d......
0010: C6 CF 60 2B B9 4B 60 75 95 20 F9 1C E2 76 2E A4 ..`+.K`u. ...v..
0020: 8A 48 ED 06 DE 14 D9 C5 8F B8 7F 7E 43 C4 C3 B8 .H..........C...
Client MAC write Secret:
0000: 10 6B 0A 62 14 3A 0C EB B8 5E 31 68 6B BC 6C 6C .k.b.:...^1hk.ll
0010: C8 92 02 58 ...X
Server MAC write Secret:
0000: FF C7 8C 92 30 29 C5 39 FC B7 C5 B6 5D 04 BE C9 ....0).9....]...
0010: 4E E7 94 F0 N...
Client write key:
0000: AE 2E 07 3D 29 4F 4F 27 34 EC 3D DA 5D 92 69 AC ...=)OO'4.=.].i.
Server write key:
0000: D7 2D 6D 18 93 8F 45 7B 36 53 F8 18 94 C7 1E 3B .-m...E.6S.....;
... no IV derived for this protocol
[read] MD5 and SHA1 hashes: len = 70
0000: 10 00 00 42 41 04 01 E3 93 26 01 D2 8C 84 C0 09 ...BA....&......
0010: 3A 87 46 16 16 96 CC DC 5E 6A 97 C4 70 35 E8 C4 :.F.....^j..p5..
0020: 22 66 26 59 D8 4F 28 F8 1D 6B BA 88 F9 89 6A 0D "f&Y.O(..k....j.
0030: 7E 6B 34 78 77 0D 29 9A 40 C3 C2 76 83 28 3D 27 .k4xw.).@..v.(='
0040: C2 FE 6B 9C 37 F2 ..k.7.
[Raw read]: length = 5
0000: 14 03 03 00 01 .....
[Raw read]: length = 1
0000: 01 .
WebsocketSelector10, READ: TLSv1.2 Change Cipher Spec, length = 1
[Raw read]: length = 5
0000: 16 03 03 00 40 ....@
[Raw read]: length = 64
0000: BD A4 20 2C 75 D0 76 8C 17 BD A2 E1 34 EE 90 88 .. ,u.v.....4...
0010: CE 4A 2C 64 EE 52 C5 45 47 3A E7 71 21 D9 29 B6 .J,d.R.EG:.q!.).
0020: E7 A6 70 21 1A 2C B8 8B 07 7F D8 09 E3 55 93 57 ..p!.,.......U.W
0030: E4 E6 80 99 E1 FB BA DF B5 79 C1 81 33 5F E5 44 .........y..3_.D
WebsocketSelector10, READ: TLSv1.2 Handshake, length = 64
Padded plaintext after DECRYPTION: len = 64
0000: 3A F9 8B BC 96 6D 1B 5D F1 18 4F 04 3B EB 6E FB :....m.]..O.;.n.
0010: 14 00 00 0C 4A 69 B1 4C 16 59 CC 96 9B 7F 6C 22 ....Ji.L.Y....l"
0020: BF 98 AE 87 17 40 7A 6D B5 90 3D AD B8 46 B6 F8 .....@zm..=..F..
0030: E0 0E 24 CF 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B ..$.............
*** Finished
verify_data: { 74, 105, 177, 76, 22, 89, 204, 150, 155, 127, 108, 34 }
***
[read] MD5 and SHA1 hashes: len = 16
0000: 14 00 00 0C 4A 69 B1 4C 16 59 CC 96 9B 7F 6C 22 ....Ji.L.Y....l"
WebsocketSelector10, WRITE: TLSv1.2 Change Cipher Spec, length = 1
*** Finished
verify_data: { 231, 71, 131, 63, 36, 125, 3, 238, 159, 185, 212, 8 }
***
[write] MD5 and SHA1 hashes: len = 16
0000: 14 00 00 0C E7 47 83 3F 24 7D 03 EE 9F B9 D4 08 .....G.?$.......
Padded plaintext before ENCRYPTION: len = 64
0000: 00 DC 66 AB 77 B9 6C 21 D3 54 18 89 75 54 E3 A2 ..f.w.l!.T..uT..
0010: 14 00 00 0C E7 47 83 3F 24 7D 03 EE 9F B9 D4 08 .....G.?$.......
0020: 21 CB BC B5 9F 81 1C C6 95 D3 1F 6A 0C 74 B4 55 !..........j.t.U
0030: 8F 96 46 26 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B ..F&............
WebsocketSelector10, WRITE: TLSv1.2 Handshake, length = 64
%% Cached server session: [Session-2, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA]
[Raw write]: length = 6
0000: 14 03 03 00 01 01 ......
[Raw write]: length = 69
0000: 16 03 03 00 40 25 76 3C A0 98 BF F9 9A 53 D0 16 ....@%v<.....S..
0010: 93 16 BC 6D 1D 73 A7 4A F6 E3 19 D9 B9 25 8F 5C ...m.s.J.....%.\
0020: F9 FB 42 C0 3C 16 19 DB 1D C9 BE C6 D9 DD 78 4D ..B.<.........xM
0030: 63 52 01 46 F8 39 8A BD CA 02 2D 29 C1 F5 D9 76 cR.F.9....-)...v
0040: CA C8 9D C0 D9 .....
WebsocketSelector10, called closeOutbound()
WebsocketSelector10, closeOutboundInternal()
WebsocketSelector10, SEND TLSv1.2 ALERT: warning, description = close_notify
Padded plaintext before ENCRYPTION: len = 48
0000: 4B 75 47 88 E9 58 87 82 6E 1D E6 48 29 6D 07 B7 KuG..X..n..H)m..
0010: 01 00 0C A1 91 57 40 B6 C0 D1 DB 07 82 06 7A 4E .....W@.......zN
0020: 9A CD 49 59 94 F9 09 09 09 09 09 09 09 09 09 09 ..IY............
WebsocketSelector10, WRITE: TLSv1.2 Alert, length = 48
%% Invalidated: [Session-2, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA]
[Raw write]: length = 53
0000: 15 03 03 00 30 9C F3 36 09 95 51 F9 46 52 E9 40 ....0..6..Q.FR.@
0010: B6 E8 DB E0 2E 68 2D ED 22 A9 5E D5 06 73 B1 31 .....h-.".^..s.1
0020: 5C 3F 20 2E 05 0D 8E 3E 36 33 D9 F5 5D 6A 58 EC \? ....>63..]jX.
0030: A5 77 FD C5 E9 .w...
Removing connection which is not in the connections collection! Possible no handshake recieved! org.java_websocket.WebSocketImpl@103d2a8
Hello @Dayssam, I was not expecting a different behavior. I was just expecting an onError call with some specific information.
What are you using as a SSLWebSocketServerFactory ? Anything specific you can tell me?
Greetings marci4
Hi @marci4
i'm using the websokcet server for localhost wss://localhost;6789
i'm using 3 SSLWebSocketServerFactory methods ,
public static SSLContext getSSLConextFromKeystore3() throws NoSuchAlgorithmException, CertificateException, FileNotFoundException, IOException, UnrecoverableKeyException, KeyStoreException, KeyManagementException{
String storeType = "JKS";
//String keystore = "keylocalhost.jks";
char[] storePassword = new char[] {'1', '2', '3', '4', '5', '6'};
char[] keyPassword = new char[] {'1', '2', '3', '4', '5', '6'};
KeyStore ks = KeyStore.getInstance(storeType);
InputStream inputStream = UtilFile.searchResource("resource/"+KEYSTORE);
ks.load(inputStream, storePassword);
/*
KeyStore ks = KeyStore.getInstance(storeType);
ClassLoader classLoader = SofiSignaJWS.class.getClassLoader();
String path = classLoader.getResource("resource/"+keystore).getPath();
File kf = new File( path );
ks.load(new FileInputStream( kf ), storePassword);
*/
KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
kmf.init(ks, keyPassword);
TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
tmf.init(ks);
SSLContext sslContext;
sslContext = SSLContext.getInstance("TLS");
sslContext.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
return sslContext;
}
public static SSLContext getSSLConextFromKeystore() {
// load up the key store
String storeType = "JKS";
//String keystore = "keylocalhost.jks";
String storePassword = "123456";
String keyPassword = "123456";
KeyStore ks;
SSLContext sslContext = null;
try {
ClassLoader classLoader = SofiSignaJWS.class.getClassLoader();
String path = classLoader.getResource("resource/"+KEYSTORE).getPath();
File kf = new File( path );
ks = KeyStore.getInstance(storeType);
ks.load(new FileInputStream( kf ), storePassword.toCharArray());
KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
kmf.init(ks, keyPassword.toCharArray());
TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
tmf.init(ks);
sslContext = SSLContext.getInstance("TLS");
sslContext.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
} catch (UnrecoverableKeyException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (KeyManagementException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (KeyStoreException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NoSuchAlgorithmException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (CertificateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
/*
KeyStore ks = KeyStore.getInstance( STORETYPE );
ClassLoader classLoader = SofiSignaJWS.class.getClassLoader();
String path = classLoader.getResource("resource/"+KEYSTORE).getPath();
System.out.println(path);
File kf = new File( path );
System.out.println(kf.getAbsolutePath());
ks.load( new FileInputStream( kf ), STOREPASSWORD.toCharArray() );
KeyManagerFactory kmf = KeyManagerFactory.getInstance( "SunX509" );
kmf.init( ks, KEYPASSWORD.toCharArray() );
TrustManagerFactory tmf = TrustManagerFactory.getInstance( "SunX509" );
tmf.init( ks );
SSLContext sslContext = null;
sslContext = SSLContext.getInstance( "TLS" );
sslContext.init( kmf.getKeyManagers(), tmf.getTrustManagers(), null );
//
s.setWebSocketFactory(new DefaultSSLWebSocketServerFactory( sslContext ));
*/
return sslContext;
}
public static WebSocketServerFactory getSSLConextFromKeystore2(){
String STORETYPE = "JKS";
//String KEYSTORE = "keylocalhost.jks";
String STOREPASSWORD = "123456";
String KEYPASSWORD = "123456";
CustomSSLWebSocketServerFactory factory = null;
try {
KeyStore ks = KeyStore.getInstance(STORETYPE);
ClassLoader classLoader = SofiSignaJWS.class.getClassLoader();
String path = classLoader.getResource("resource/"+KEYSTORE).getPath();
File kf = new File(path);
ks.load(new FileInputStream(kf), STOREPASSWORD.toCharArray());
KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
kmf.init(ks, KEYPASSWORD.toCharArray());
TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
tmf.init(ks);
SSLContext sslContext = SSLContext.getInstance("TLS");
sslContext.init(kmf.getKeyManagers(), tmf.getTrustManagers(), new java.security.SecureRandom());
//Lets remove some ciphers and protocols
SSLEngine engine = sslContext.createSSLEngine();
SSLParameters sslParams = new SSLParameters();
//SSLSocketChannel2
List<String> ciphers = new ArrayList<String>( Arrays.asList(engine.getEnabledCipherSuites()));
//ciphers.remove("TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256");
//ciphers.add("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256");
for (String string : ciphers) {
System.out.println("cipher : " + string);
}
ciphers = new ArrayList<String>( Arrays.asList(engine.getSupportedCipherSuites()));
for (String string : ciphers) {
System.out.println("Supppoted cipher : " + string);
}
ciphers.remove("TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256");
ciphers.remove("TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384");
ciphers.remove("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384");
ciphers.remove("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA");
ciphers.remove("TLS_DHE_RSA_WITH_AES_256_GCM_SHA384");
ciphers.remove("TLS_DHE_RSA_WITH_AES_256_CBC_SHA256");
ciphers.remove("TLS_DHE_RSA_WITH_AES_256_CBC_SHA");
//Ciphers removed on my own
ciphers.remove("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256");
ciphers.remove("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA");
ciphers.remove("TLS_RSA_WITH_AES_128_GCM_SHA256");
ciphers.remove("TLS_RSA_WITH_AES_128_CBC_SHA256");
ciphers.remove("TLS_RSA_WITH_AES_128_CBC_SHA");
engine.setEnabledCipherSuites(ciphers.toArray(new String[]{}));
engine.setUseClientMode(false);
List<String> protocols = new ArrayList<String>( Arrays.asList(engine.getEnabledProtocols()));
//protocols.remove("SSLv3");
for (String string : protocols) {
System.out.println("Enabled Protocol : " + string);
}
protocols = new ArrayList<String>( Arrays.asList(engine.getSupportedProtocols()));
for (String string : protocols) {
System.out.println("Suppored Protocol : " + string);
}
factory = new CustomSSLWebSocketServerFactory(sslContext, protocols.toArray(new String[]{}), ciphers.toArray(new String[]{}));
System.out.println("default : " + KeyStore.getDefaultType());
// Different example just using specific ciphers and protocols
/*
String[] enabledProtocols = {"TLSv1.2"};
String[] enabledCipherSuites = {"TLS_RSA_WITH_AES_128_CBC_SHA", "TLS_RSA_WITH_AES_256_CBC_SHA"};
factory = new CustomSSLWebSocketServerFactory(sslContext, enabledProtocols,enabledCipherSuites);
*/
} catch (UnrecoverableKeyException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (KeyManagementException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (KeyStoreException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NoSuchAlgorithmException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (CertificateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return factory;
}
And which one are you using?
Greetings marci4
everytime i made the test with all the 3
Sorry but your formatting fu**ed me up.
So you are just using the one method getSSLConextFromKeystore2()
since the other two just return a SSLContext..
Have you enabled Java Cryptography Extension (JCE)?
Greetings marci4
hi @marci4
how to enable the extension by code ?
For your information , this code is working in IE if i use Java 1.7u80 or Java 8 but not if i use 1.6u45 or 1.7u0
Please google that yourself!
Well then it is just a broken/unsupported cipher as it sounds like. Nothing I can do!
Greetings marci4
thank you @marci for your time, can you juste give me some tested ciphers in java 6 or 7 ?
No, please don't use these versions any more since they are outdated and don't receive any security fixes any more!
Hi Java-WebSockets,
i want to to use a secure web socket server with TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 certificate in java 1.6u45 or higher
but i got this error :