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
{{ message }}
Repository navigation
CloseNotify alert received when using rustls/examples/simpleclient.rs #380
I'm trying to figure out how to write my own HTTP client using rustls/examples/simpleclient.rs as a base.
The code in master works when using it against google.com:443 or oracle.com, but fails on other popular sites such as reddit.com, twitter.com, github.com with the following error (this was against twitter.com):
Current ciphersuite: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Custom { kind: ConnectionAborted, error: "CloseNotify alert received" }', src/main.rs:40:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Not sure where in the pipeline this error is happening.
This is a normal and expected error: I've ensure it's mentioned in the docs as of a5e1488. TLDR: it signifies clean connection closure by the peer. close_notify does not have universal support in TLS libraries/applications, so that's why you see variance between hosts. In your application you should respond by tearing down the underlying TCP connection.
Activity
ctz commentedon Jun 28, 2020
This is a normal and expected error: I've ensure it's mentioned in the docs as of a5e1488. TLDR: it signifies clean connection closure by the peer. close_notify does not have universal support in TLS libraries/applications, so that's why you see variance between hosts. In your application you should respond by tearing down the underlying TCP connection.
volfco commentedon Jun 28, 2020
I still think the example should be fixed so it's handled.
I can open up an MR throwing in a check to prevent a panic like this:
But there has to be a better solution