-
Notifications
You must be signed in to change notification settings - Fork 121
Open
Description
src/main.rs
:
fn main() {
use openssl::ssl::{SslMethod, SslConnector};
use std::io::{Read, Write};
use std::net::TcpStream;
let mut cb = SslConnector::builder(SslMethod::tls()).unwrap();
cb.set_verify(openssl::ssl::SslVerifyMode::NONE);
let connector = cb.build();
let stream = TcpStream::connect("example.com:443").unwrap();
let mut stream = connector.connect("example.com", stream).unwrap();
stream.write_all(b"GET / HTTP/1.0\r\n\r\n").unwrap();
let mut res = vec![];
stream.read_to_end(&mut res).unwrap();
println!("{}", String::from_utf8_lossy(&res));
}
Cargo.toml
:
[package]
name = "osslvtest"
version = "0.1.0"
authors = []
edition = "2018"
[dependencies]
openssl = { version = "0.10.32", features = ["vendored"] }
Run attempt:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ErrorStack([Error { code: 604422254, library: "random number generator", function: "RAND_DRBG_instantiate", reason: "error retrieving entropy", file: "crypto/rand/drbg_lib.c", line: 335 }, Error { code: 604418162, library: "random number generator", function: "RAND_DRBG_generate", reason: "in error state", file: "crypto/rand/drbg_lib.c", line: 588 }, Error { code: 604422254, library: "random number generator", function: "RAND_DRBG_instantiate", reason: "error retrieving entropy", file: "crypto/rand/drbg_lib.c", line: 335 }, Error { code: 604422254, library: "random number generator", function: "RAND_DRBG_instantiate", reason: "error retrieving entropy", file: "crypto/rand/drbg_lib.c", line: 335 }, Error { code: 604418162, library: "random number generator", function: "RAND_DRBG_generate", reason: "in error state", file: "crypto/rand/drbg_lib.c", line: 588 }, Error { code: 604422254, library: "random number generator", function: "RAND_DRBG_instantiate", reason: "error retrieving entropy", file: "crypto/rand/drbg_lib.c", line: 335 }, Error { code: 604418162, library: "random number generator", function: "RAND_DRBG_generate", reason: "in error state", file: "crypto/rand/drbg_lib.c", line: 588 }, Error { code: 604422254, library: "random number generator", function: "RAND_DRBG_instantiate", reason: "error retrieving entropy", file: "crypto/rand/drbg_lib.c", line: 335 }, Error { code: 604418162, library: "random number generator", function: "RAND_DRBG_generate", reason: "in error state", file: "crypto/rand/drbg_lib.c", line: 588 }, Error { code: 604422254, library: "random number generator", function: "RAND_DRBG_instantiate", reason: "error retrieving entropy", file: "crypto/rand/drbg_lib.c", line: 335 }, Error { code: 604422254, library: "random number generator", function: "RAND_DRBG_instantiate", reason: "error retrieving entropy", file: "crypto/rand/drbg_lib.c", line: 335 }, Error { code: 604418162, library: "random number generator", function: "RAND_DRBG_generate", reason: "in error state", file: "crypto/rand/drbg_lib.c", line: 588 }, Error { code: 604422254, library: "random number generator", function: "RAND_DRBG_instantiate", reason: "error retrieving entropy", file: "crypto/rand/drbg_lib.c", line: 335 }, Error { code: 604418162, library: "random number generator", function: "RAND_DRBG_generate", reason: "in error state", file: "crypto/rand/drbg_lib.c", line: 588 }, Error { code: 336236609, library: "SSL routines", function: "SSL_CTX_new", reason: "malloc failure", file: "ssl/ssl_lib.c", line: 3147 }])', src/main.rs:6:58
Does not happen with non-musl i686 or with x86_64 musl build. arm-unknown-linux-musleabi
also works.
Trying with RUSTFLAGS='-C link-arg=-Wl,-z,stack-size=0x1000000'
does not lead to improvement.
rustc 1.49.0 (e1884a8e3 2020-12-29)
, cargo 1.49.0 (d00d64df9 2020-12-05)
.
Metadata
Metadata
Assignees
Labels
No labels