this post was submitted on 31 Dec 2023
6 points (87.5% liked)

The Java Programming Language

207 readers
5 users here now

Discussion of Java and java-related technologies. This includes things like:

For assistance learning Java, please go to Learn Java

founded 1 year ago
MODERATORS
6
submitted 10 months ago* (last edited 10 months ago) by Red1C3@lemmy.world to c/java@lemmy.world
 

I've been trying to follow the tutorial here, after failing to apply it to my project I tried to do the tutorial as it is, and I'm still getting handshaking failures.

On the server side, I have the following exception: javax.net.ssl.SSLHandshakeException: No available authentication scheme

While on the client side, I have the following: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure

I'd like to add that I'm starting fresh without any previous any keystore nor truststore, executing the commands in the tutorial does generate the key and trust stores.

I've tried making the CN the same as my machine hostname too, didn't work, nothing worked, the server and the client could never handshake.

Side note: this is just a demo I'm doing, so I don't really care if it has security flaws, I'm just trying to get TLS to work.

Thx in advance.

Update: I downgraded from JDK21 to JDK17 and it worked fine :/

you are viewing a single comment's thread
view the rest of the comments
[โ€“] rorsche@lemm.ee 1 points 10 months ago (1 children)

Is the client presenting a client certificate? handshake_failure with mTLS generally means the client isn't presenting a certificate when the server requires it

[โ€“] Red1C3@lemmy.world 1 points 10 months ago

Yes I guess, downgrading my JDK really did make it work, probably something in the docs has the answer to why something has stopped working