Cannot establish DTLS connection with certificate authentication mode to the leshan bootstrap server
See original GitHub issueHello,
I am using Demo Bootstrapping Server with Demo Client using X.509 security. I have connected the Demo Bootstrap server and inserted the Client Certificate and Client Private Key and End Point as recommended to the Bootstrap Sandbox. Upon Starting the client, the handshake fails and returns a Null Pointer Exception.
java.lang.NullPointerException: null
at java.util.Objects.requireNonNull(Objects.java:203)
at java.util.Arrays$ArrayList.<init>(Arrays.java:3813)
at java.util.Arrays.asList(Arrays.java:3800)
at org.eclipse.californium.scandium.dtls.ServerHandshaker.createCertificateRequest(ServerHandshaker.java:532)
at org.eclipse.californium.scandium.dtls.ServerHandshaker.receivedClientHello(ServerHandshaker.java:400)
at org.eclipse.californium.scandium.dtls.ServerHandshaker.doProcessMessage(ServerHandshaker.java:200)
at org.eclipse.californium.scandium.dtls.Handshaker.processMessage(Handshaker.java:638)
at org.eclipse.californium.scandium.DTLSConnector.startNewHandshake(DTLSConnector.java:1842)
at org.eclipse.californium.scandium.DTLSConnector.processClientHello(DTLSConnector.java:1737)
at org.eclipse.californium.scandium.DTLSConnector.access$1500(DTLSConnector.java:217)
at org.eclipse.californium.scandium.DTLSConnector$12.run(DTLSConnector.java:1675)
at org.eclipse.californium.elements.util.SerialExecutor$1.run(SerialExecutor.java:276)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Upon this, I have tried commenting out this part of the server code, since I am using a self signed certificate and do not need to verify the certificates on either ends:
@Override
public X509Certificate[] getAcceptedIssuers() {
return null;
}
})
The Null Pointer Exception was gone and was replaced with an error that client is using Unsupported CipherSuits where I ran the command with -oc to support deprecated ciphersuits but there was no use.
03:18:21.924 [DTLS-Connection-Handler-4] DEBUG org.eclipse.californium.scandium.dtls.Connection - Handshake with [/127.0.0.1:5687] has been started
03:18:21.933 [DTLS-Connection-Handler-4] INFO org.eclipse.californium.scandium.DTLSConnector - Aborting handshake with peer [/127.0.0.1:5687]: Client proposed unsupported cipher suites only
03:18:21.934 [DTLS-Connection-Handler-4] DEBUG org.eclipse.californium.scandium.DTLSConnector - Terminating connection with peer [/127.0.0.1:5687], reason [HANDSHAKE_FAILURE]
03:18:21.934 [DTLS-Connection-Handler-4] DEBUG org.eclipse.californium.scandium.DTLSConnector - send ALERT Alert Protocol
Level: FATAL
Description: HANDSHAKE_FAILURE
My colleague also tried it with wakaama Client and the leshan BS demo server reported the same issue. I have attached logs and wireshark files hoping it will be of use.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
Thanks! Keep up the good work. And thanks to @tolgahanakgun
Thx to you to find a new bug 🙏 !