<div dir="ltr">My goal is for a community of automation experts to have a perfectly matched Client hello (JA3 hash) fingerprint as modern commercial browsers so they can do their job more successfully. For this to happen one must add 8 additional extensions to the Client hello request. Those changes were done under /sun/security/ssl. Mostly modifying SSLExtension.java file by adding additional extensions. My goal is to have perfectly working adjusted extensions and to use TLS1.3 on top of that. The extensions that my Java client using standard Java net library had prior me adding new ones were:<br>1.key_share<div>2. signature_algorithms_cert</div><div>3. psk_key_exchange_modes</div><div>4. supported_versions </div><div>5. signature_algorithms</div><div>6. application_layer_protocol_negotiation</div><div>7. supported_group</div><div>8. status_request</div><div>9. server_name</div><div><br></div><div>After the change to match Chrome's extensions it became:<br>1. TLS_GREASE (0x5a5a)</div><div>2. status_request</div><div>3. ec_point_formats</div><div>4. supported_groups</div><div>5. signed_certificate_timestamp</div><div>6. application_settings</div><div>7. server_name</div><div>8. application_layer_protocol_negotiation</div><div>9. key_share</div><div>10. extended_master_secret</div><div>11. extensionRenegotiationInfo</div><div>12. session_ticket</div><div>13. supported_versions</div><div>14. signature_algorithms</div><div>15. psk_key_exchange_modes</div><div>16. TLS_GREASE (0x3a3a)</div><div>17. padding</div><div><br></div><div>The reason for me making this post is because when I add application_settings extension, the module doesn't work for certain websites such as for google domains and for some it works perfectly fine. I analysed in Wireshark the requests they were all properly done but for some weird reason, Java gives back following exceptions once I encounter some sites it crashes on</div><div><br></div><div>1. Received fatal alert: decode_error<br>2. Unknown handshake type size, Handshake.msg_type = 25<br>3. Received fatal alert: unexpected_message<br></div><div><br></div><div><br></div><div>Unfortunately I don't know how to track fatal alerts and their cores so I'm not sure how I can handle this. Why does Java crash on this simple extension such as application_settings? It holds nothing but following</div><div><pre style="color:rgb(0,0,0)"> {
        "name": "application_settings (17513)",
        "protocols": [
          "h2"
        ]
      }</pre><pre style="overflow-wrap: break-word; text-wrap: wrap;"><font color="#000000">

</font><font face="Arial, Helvetica, sans-serif"><span style="white-space-collapse: collapse;">That's pretty much it. Once I remove this extension, the module works just fine with the rest added ones. I should add on top that i do these 2 following lines as my ssl configuration prior creating java client</span></font></pre><pre style="overflow-wrap: break-word; text-wrap: wrap;">sslParams.setApplicationProtocols(new String[] {"h2", "http/1.1"});<br>sslParams.setProtocols(new String[]{"TLSv1.3"});<font face="Arial, Helvetica, sans-serif"><span style="white-space-collapse: collapse;"><br></span></font></pre><pre style="overflow-wrap: break-word; text-wrap: wrap;">Any help would be welcome! Thanks in advance!</pre></div></div>