Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
KeithLaiKB opened this issue Aug 2, 2022 · 7 comments
Open

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

KeithLaiKB opened this issue Aug 2, 2022 · 7 comments

Comments

@KeithLaiKB
Copy link

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.

@szysas
Copy link
Contributor

szysas commented Aug 10, 2022

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

@KeithLaiKB
Copy link
Author

KeithLaiKB commented Sep 1, 2022

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?

@szysas
Copy link
Contributor

szysas commented Sep 18, 2022

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

@KeithLaiKB
Copy link
Author

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?

@szysas
Copy link
Contributor

szysas commented Oct 3, 2022

That's right

@KeithLaiKB
Copy link
Author

That's right

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

@szysas
Copy link
Contributor

szysas commented May 8, 2023

That's right, TLS is TCP based.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants