Closed judos closed 3 years ago
Hi, This is indeed caused by having a self-signed certificate. You can pass the --noCertificateCheck option to the client to make it skip the certificate check. By the way, you don't have to pass certificate (and key) with the client, this is only necessary when the server requires client authentication. Hth! Regards Peter
Thanks for the reply. Now it works!
In Detail: I removed the client cert/key for the client and added argument to ignore the server certificate (because it is self-signed at the moment). Also I had to change the certificate because servername of the certificate (localhost here) is verified by the client.
server
java -cp kwik.jar net.luminis.quic.server.Server cert-win-lb.pem key-win-lb.pem 11014 "D:\Downloads\"
client
java -jar kwik.jar localhost:11014 -H 'index.html' --noCertificateCheck
[...]
00:09.230 -> Packet A|2|S0|8617f3da|27|1 AckFrame[2-0|Δ4]
Server returns:
Hello World!
00:09.746 -> Packet A|3|S0|8617f3da|31|2 ConnectionCloseFrame[0|0|] AckFrame[2-0|Δ0]
Maybe this would be a good example how to use the library, provided all needed files (kwik.jar + test certs) and basic command how to try it out): test.zip
Thanks for the feedback. I read in your notes that you had to replace line breaks in the key file (and probably in the certificate file too), if you want you can create an issue for that, should be easy to fix. Regards Peter
No worries. For the issue with the line breaks I checked your code and saw that you read the certificate with default system encoding. I guess because I created the certificates with LinuxSubsystem on Windows it's a bit weird. But I assume your code is correct :) Best regards, Julian
Hi, I'm trying your examples (from readme) to learn how I would use kwik in a project. For testing I created self signed cert/key files using openssl:
Then I ran server and client as follows (with output). Server:
Client:
How can I fix the error I get? Did I misunderstand any of the options provided for the example?
TLS Error 42 means "Bad certificate" (https://en.wikipedia.org/wiki/Transport_Layer_Security#TLS_record) Is this because it is a self-signed certificate? Does it need to be in a certificate chain and publicly verifiable?
Thanks for your help!