async-rs / async-rs/async-tls

SSL error while using async_tls

Open
#36 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
172
Forks
49
PR merge metrics
No merged PRs in 30d

Description

Hi

When I tried to use async_tls to establish a TLS connection to a ncat instance (using self signed certificates that I generated), I saw this error from the ncat terminal and the connection just close.
````
Ncat: Failed SSL connection from 127.0.0.1: error:00000000:lib(0):func(0):reason(0)
````
I noticed on Wireshark that the program attempts the normal TCP handshake and then followed by FIN-ACK to close the connection. I did not see the TLS protocol being initiated. I followed the code snippet from async_tls' documentation.
````
async_std::task::block_on(async {
let connector = TlsConnector::default();
let tcp_stream = async_std::net::TcpStream::connect("127.0.0.1:4444").await?;
let encrypted_stream = connector.connect("127.0.0.1:4444", tcp_stream).await?;

Ok(()) as async_std::io::Result<()>
});
````

Could this be related to the certificate not being accepted? I tried looking at async_tls' and rustls' documentation but I did not find options for me to accept self signed certificates or other dangerous options that native_tls has.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the connection with the async_tls documentation snippet, ncat, and the self-signed certificates, then inspect async_tls and rustls documentation for certificate validation and trust configuration. Confirm whether the failure is caused by certificate rejection or by TLS negotiation not starting; done should clearly establish the supported behavior and any required configuration for self-signed certificates.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.