You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And sending some plain-text traffic to this sample echo server like following:
curl -v "http://127.0.0.1:12345"
Of course, sending http request to echo server does not make much sense but I am just checking that call to tls_acceptor.accept should fail if it receives non-ssl traffic. On linux machine I am receiving following output with error on server-
accept connection from 127.0.0.1:48271
thread 'tokio-runtime-worker' panicked at 'accept error: Ssl(Error { code: ErrorCode(1), cause: Some(Ssl(ErrorStack([Error { code: 336027804, library: "SSL routines", function: "SSL23_GET_CLIENT_HELLO", reason: "http request", file: "s23_srvr.c", line: 414 }]))) }, X509VerifyResult { code: 0, error: "ok" })', src/main.rs:33:68
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
However on Mac OS X (11.4) call to tls_acceptor.accept(socket).await.expect("accept error") never terminates and even curl command keeps on waiting.
I just want to handle scenario where plain-text traffic is received on server instead of ssl-traffic and tls_acceptor should error out. Let me know if I am missing something here.
I am using rust 1.52.1 with following cargo dependencies-
tokio = { version = "1", features = ["full"] }
tokio-native-tls = "0.3.0"
native-tls = "0.2.7"
The text was updated successfully, but these errors were encountered:
I am trying this echo server example with TlsAcceptor:
https://github.com/tokio-rs/tls/blob/master/tokio-native-tls/examples/echo.rs
And sending some plain-text traffic to this sample echo server like following:
Of course, sending http request to echo server does not make much sense but I am just checking that call to tls_acceptor.accept should fail if it receives non-ssl traffic. On linux machine I am receiving following output with error on server-
However on Mac OS X (11.4) call to tls_acceptor.accept(socket).await.expect("accept error") never terminates and even curl command keeps on waiting.
I just want to handle scenario where plain-text traffic is received on server instead of ssl-traffic and tls_acceptor should error out. Let me know if I am missing something here.
I am using rust 1.52.1 with following cargo dependencies-
The text was updated successfully, but these errors were encountered: