SSL Handshake Message Examples

Q

How to get some SSL Handshake Message Examples?

✍: FYIcenter

A

You can get SSL Handshake Message Examples as shown below:

\fyicenter>\local\jdk-1.8.0\bin\java -Djavax.net.debug=ssl:handshake:data
   HttpsUrlReader > ssl.log
 
\fyicenter>edit ssl.log

*** ClientHello, TLSv1.2
[write] MD5 and SHA1 hashes:  len = 230
0000: 01 00 00 E2 03 03 59 4D   47 6B AE F3 BE 6E A8 BF  ......YMGk...n..
... (Client Hello message)

main, WRITE: TLSv1.2 Handshake, length = 230
main, READ: TLSv1.2 Handshake, length = 89

*** ServerHello, TLSv1.2
[read] MD5 and SHA1 hashes:  len = 89
0000: 02 00 00 55 03 03 E0 79   B8 99 B5 A0 B4 B3 12 E4  ...U...y........
...(Server Hello message)

main, READ: TLSv1.2 Handshake, length = 3611

*** Certificate chain
chain [0] = [
[
  Version: V3
  Subject: CN=www.oracle.com, OU=Content Management Services IT, O=Oracle Corporation, 
     L=Redwood Shores, ST=California, C=US
  ...
chain [1] = [
[
  Version: V3
  Subject: CN=GeoTrust SSL CA - G3, O=GeoTrust Inc., C=US
  ...
  
[read] MD5 and SHA1 hashes:  len = 3611
0000: 0B 00 0E 17 00 0E 14 00   09 BB 30 82 09 B7 30 82  ..........0...0.
... (Certificate message)

main, READ: TLSv1.2 Handshake, length = 333

*** ECDH ServerKeyExchange
Signature Algorithm SHA512withRSA
Server key: Sun EC public key, 256 bits
  public x coord: 113832845065090231260624556091430442495829389188372332627611195826211925947298
  public y coord: 68894900374756982365064787977581603729338017947347651854900659001815261636661
  parameters: secp256r1 [NIST P-256, X9.62 prime256v1] (1.2.840.10045.3.1.7)

[read] MD5 and SHA1 hashes:  len = 333
0000: 0C 00 01 49 03 00 17 41   04 FB AB 1B 6A A8 24 AD  ...I...A....j.$.
... (Server Key Exchange message)

main, READ: TLSv1.2 Handshake, length = 4

*** ServerHelloDone
[read] MD5 and SHA1 hashes:  len = 4
0000: 0E 00 00 00                                        ....
... (Server Hello Done message, 4 bytes only)

*** ECDHClientKeyExchange
ECDH Public value:  { 4, 240, 6, 79, 182, 141, 168, 249, 35, 89, 57, 151, 143, ... }
[write] MD5 and SHA1 hashes:  len = 70
0000: 10 00 00 42 41 04 F0 06   4F B6 8D A8 F9 23 59 39  ...BA...O....#Y9
... (Client Key Exchange message)

main, WRITE: TLSv1.2 Handshake, length = 70

main, WRITE: TLSv1.2 Change Cipher Spec, length = 1

*** Finished
[write] MD5 and SHA1 hashes:  len = 16
0000: 14 00 00 0C 73 E2 76 C8   98 AB EE 6D 3D 3E 20 E8  ....s.v....m=> .
... (Finished message)

main, WRITE: TLSv1.2 Handshake, length = 40
main, READ: TLSv1.2 Change Cipher Spec, length = 1
main, READ: TLSv1.2 Handshake, length = 40

*** Finished
verify_data:  { 100, 6, 25, 34, 181, 239, 231, 105, 35, 97, 230, 2 }

[read] MD5 and SHA1 hashes:  len = 16
f0000: 14 00 00 0C 64 06 19 22   B5 EF E7 69 23 61 E6 02  ....d.."...i#a..
... (Finished message)

main, WRITE: TLSv1.2 Application Data, length = 177
... (HTTP request message)

main, READ: TLSv1.2 Application Data, length = 242
... (HTTP response message)

main, called close()
main, called closeInternal(true)
main, SEND TLSv1.2 ALERT:  warning, description = close_notify
main, WRITE: TLSv1.2 Alert, length = 26
main, called closeSocket(true)

 

HttpsUrlInfo.java - HTTPS URL Information

SSL Handshake Message Sequence

Examples for jsse.jar - Java Secure Socket Extension

⇑⇑ FAQ for jsse.jar - Java Secure Socket Extension

2018-03-24, 1698🔥, 0💬