java-coap icon indicating copy to clipboard operation
java-coap copied to clipboard

Could java-coap using SSL with my own CA certificate?

Open KeithLaiKB opened this issue 3 years ago • 7 comments
trafficstars

I am trying the condition that I have my own CA, and I try to use client to use SSL to connect the server with the CA certificate. How could I implement it, I just could find the test about SSL using the secrete with keystore in this library.

KeithLaiKB avatar Aug 02 '22 19:08 KeithLaiKB

Look at the tests, they are using own self sign CA. You would need to create own keystore.

szysas avatar Aug 10 '22 08:08 szysas

Look at the tests, they are using own self sign CA. You would need to create own keystore.

I have a question is that, could the client just use the CA without keystore(.jks)?My ca certificate format is .crt

and another question is that I want to use DTLS/SSL(not using ProcessBuilder), but in the test (https://github.com/PelionIoT/java-coap/blob/26902e306995a439eb74335a3f35bcec74867d9c/coap-core/src/test/java/com/mbed/coap/transport/javassl/SSLUtils.java) it is about TLSv1.2, how can I do with DTLS/SSL?

KeithLaiKB avatar Sep 01 '22 17:09 KeithLaiKB

No, you would need to make a keystore. There is very hand GUI tool to create keystores: https://keystore-explorer.org/

Java does not support DTLS so you would need to use some third party. In this fork: https://github.com/open-coap/java-coap, there is added integration for mbedtls that supports DTLS (PSK and Certificates): https://github.com/open-coap/java-coap/tree/master/mbedtls-transport

szysas avatar Sep 18 '22 07:09 szysas

No, you would need to make a keystore. There is very hand GUI tool to create keystores: https://keystore-explorer.org/

Java does not support DTLS so you would need to use some third party. In this fork: https://github.com/open-coap/java-coap, there is added integration for mbedtls that supports DTLS (PSK and Certificates): https://github.com/open-coap/java-coap/tree/master/mbedtls-transport

so, you mean in master branch in this repository, it does not support DTLS directly and it does not support DTLS/SSL, right?

KeithLaiKB avatar Sep 19 '22 16:09 KeithLaiKB

That's right

szysas avatar Oct 03 '22 18:10 szysas

That's right

so in java-coap with TLS/SSL is based on TCP instead of UDP, right?

KeithLaiKB avatar May 05 '23 19:05 KeithLaiKB

That's right, TLS is TCP based.

szysas avatar May 08 '23 10:05 szysas