-
Notifications
You must be signed in to change notification settings - Fork 74
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
InvalidCertificate when using examples/client.rs
#98
Comments
Hi @odegnome
That looks like the relevant error. Can you share what subject alternate names (SANs) are in the server certificate you generated? Something like: You need to make sure there is a
Be wary using |
Hey @cpu, Yeah, there is no entry for localhost in SANs as there was no output when I ran your cmd. I thought there might be an issue with my usage of the client.rs example. As, s_client did not give the
Nevertheless, I'll add the localhost SAN and try again. |
As mentioned If you add |
Yes, it does. However, the server does not show any error. I also tried with I really thought I was starting to understand TLS, but back to square one. Thank you for cautioning against s_client. |
The main issue here is that modern TLS does not look at the certificate subject |
Yeah, It seems I followed one of the legacy posts. Thank you! |
You might have better luck with a more friendly/modern tool like minica. I'm going to close this for now since it seems we reached a mutual understanding of the cause of the error and there's no change to make in this repo. Best of luck, |
An update, just in case someone faces the same problem. I followed this post to generate new keys which resolved this issue. |
I have created a self signed certificate using openssl for the purpose of integrating TLS into a personal project. I am using the
examples/server.rs
andexamples/client.rs
files to understand how to handle the TLS connections but for some reason, I'm unable to get the example working with the provided certificate and even the server name. What am I doing wrong here?Using
example/client
to interact with the serverThe following error shows up whenever I run the client example. I have the run the following command with & without
--domain
.This output shows up on the server
Expected:
Using openssl s_client
NOTE: The following is server output and not
openssl
output.The text was updated successfully, but these errors were encountered: