eduardsui / tlse

Single C file TLS 1.2/1.3 implementation, using tomcrypt as crypto library
Other
540 stars 89 forks source link

Intermittent handshake errors with Java #48

Closed JCVoogden closed 3 years ago

JCVoogden commented 5 years ago

We are using your library to add security to a custom client/server implementation (Adelia Studio, Windows / Java / iSeries clients and servers).

With some versions of java we got an intemittent handshake error during client ley exchange (DHE). The problem is that the Java client sometimes indicate an invalid key length (255 instead of 256).

I think this is related to these java bugs :

I avoided the problem by ignoring the indicated key length and performing allocation in the _private_tls_dh_shared_secret function (see attached path). patch.txt

eduardsui commented 5 years ago

Thank you, I will take a look, perform some tests and add it to master branch.