Comments (8)
This seem a pretty major limitation of rustls
IMO 😞
from hyper-rustls.
@ctz I guess this issue should be kept open to track the possible resolution of the problem.
In a project of my company, we had to move from rustls to openssl due to this. We would be happy to switch back to rustls when this is solved.
from hyper-rustls.
from hyper-rustls.
Because it is tracked in #56.
from hyper-rustls.
let path = "D:\\workSpace\\myrust\\rust-demo\\web_tcp\\config\\sample.pem";
let f = fs::File::open(path)
.map_err(|e| error(format!("failed to open {}: {}", path, e)))?;
let rds = io::BufReader::new(f);
let mut ca = Some(rds);
// Prepare the HTTPS connector.
println!("读取证书完成");
let https = match ca {
Some(ref mut rd) => {
// Build an HTTP connector which supports HTTPS too.
let mut http = client::HttpConnector::new(4);
http.enforce_http(false);
// Build a TLS client, using the custom CA store for lookups.
let mut tls = rustls::ClientConfig::new();
tls.root_store
.add_pem_file(rd)
.map_err(|_| error("failed to load custom CA store".into()))?;
// Join the above part into an HTTPS connector.
hyper_rustls::HttpsConnector::from((http, tls))
}
// Default HTTPS connector.
None => {
println!("证书有问题!");
hyper_rustls::HttpsConnector::new(4)
}
};
from hyper-rustls.
The destination must be a hostname, not an IP address. Connecting via an IP address isn't supported currently in the rustls or webpki crates.
from hyper-rustls.
I came across this when using rustls + hyper-rustls + hyper-proxy. I think I'm getting this error because the proxy is an IP address.
I'm not sure how to proceed here, it seems a fundamental blocker that the address must be a hostname.
Why's this been closed?
from hyper-rustls.
Because it is tracked in #56.
Thank you. I didn't see that.
from hyper-rustls.
Related Issues (20)
- Server boilerplate HOT 2
- Can't resolve IP address with square brakets HOT 7
- export TlsAcceptor from server example HOT 4
- panics "no CA certificates found" HOT 13
- Custom ALPN protocol HOT 3
- More elaborate custom server name HOT 1
- Cannot access peer certificates with example's TlsStream HOT 7
- `HttpsConnectorBuilder::enable_all_versions` doesn't enable ALPN for http/1.1 HOT 1
- Release TLSAcceptor HOT 2
- example of client with mutual tls HOT 3
- When used with a specified request the body is not decrypted HOT 2
- Getting ip address of connection HOT 1
- Creating an HTTPS connection using `HttpsConnectorBuilder` does not allow you to obtain the website's URL. HOT 1
- Hyper v1 compatibility HOT 12
- Release with rustls 0.22 support? HOT 5
- Release 0.25.0 without hyper 1 support? HOT 1
- Prepare v0.25 release, update to Rustls v0.22 HOT 5
- Prepare v0.26 release, update to Hyper 1.0 HOT 8
- v0.26 server example error: failed to serve connection: error shutting down connection HOT 2
- Add support for providing HttpConnector HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hyper-rustls.