tokio-tls | An implementation of TLS/SSL streams for Tokio | TLS library
kandi X-RAY | tokio-tls Summary
kandi X-RAY | tokio-tls Summary
An implementation of TLS/SSL streams for Tokio
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of tokio-tls
tokio-tls Key Features
tokio-tls Examples and Code Snippets
Community Discussions
Trending Discussions on tokio-tls
QUESTION
I got this error:
...ANSWER
Answered 2019-Oct-21 at 13:42You should only include a dependency in a feature list if the dependency is optional. If the dependency is not optional, solely include it in the [dependencies]
section.
QUESTION
Update: This seems to be more of an issue with generating and trusting a self signed cert properly
I am building a server and client using tokio-rs. I have everything working but am now trying to add SSL/TLS to the system. I've generated a self signed certificate and installed it correctly as far as I know, but every time I try to get the client to connect to the server I get the following error:
...ANSWER
Answered 2017-Mar-30 at 17:42This is more an OpenSSL issue than a Rust issue. Assuming the client is running Ubuntu also, copy the *.crt
file to its /usr/local/share/ca-certificates/
, then run sudo /usr/sbin/update-ca-certificates
. That will tell the client to trust your certificate, and OpenSSL will no longer report an error about it.
(Edit:) You still have a remaining problem, which is that the cert's Common Name (CN) does not match the name the client is using to reach the server. Your ssl.conf
gives it a CN of localhost
, but the client asks for it by IP. Obviously if the client asks for https://localhost/ it's not going to work. So you should re-generate your cert with a different DNS name, have the client trust the new cert, and then use that name for making requests. If necessary you could just use a name like rustsslserver
and put that in your client's /etc/hosts
.
I have a git repo that shows a working example here. Note it uses hyper, not tokio, but the results should be the same.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install tokio-tls
Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. Please refer rust-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page