Comments (6)
fixed, ntex-tls 0.1.5 is released
from ntex.
Here is an example code that hangs on current version of ntex (0.5.15), but works with the changes above.
let mut cert_store = rustls::RootCertStore::empty();
cert_store.add_server_trust_anchors(webpki_roots::TLS_SERVER_ROOTS.0.iter().map(
|ta| {
rustls::OwnedTrustAnchor::from_subject_spki_name_constraints(
ta.subject,
ta.spki,
ta.name_constraints,
)
},
));
let config = ClientConfig::builder()
.with_safe_defaults()
.with_root_certificates(cert_store)
.with_no_client_auth();
let _ = ntex::connect::rustls::Connector::<&'static str>::new(config.clone()).clone();
let factory = ntex::connect::rustls::Connector::from(Arc::new(config)).memory_pool(ntex::util::PoolId::P5);
let srv = ntex::ServiceFactory::new_service(&factory, ()).await.unwrap();
// always ready
assert!(futures::future::lazy(|cx| ntex::Service::poll_ready(&srv, cx)).await.is_ready());
let result = ntex::Service::call(&srv, ntex::connect::Connect::new("testing.servicebus.windows.net:5671"))
.await;
assert!(result.is_ok());
from ntex.
On further testing it also hangs when connecting to other https websites.
from ntex.
After more testings, it only hangs against some websites, not all.
www.rust-lang.org:443 works
testing.servicebus.windows.net:443 hangs (works in browser)
testing.servicebus.windows.net:5671 hangs
from ntex.
thanks for report!
from ntex.
I can also confirm it works :)
from ntex.
Related Issues (20)
- Set a cookie doctest fails at runtime with async-std, but passes with tokio. HOT 2
- error_handler missing for JSON config HOT 1
- How to call Shared State in Application guards HOT 5
- Please respect semantic versioning HOT 1
- 23Q4 Performance Regressions as Revealed in TechEmpower Results HOT 5
- compilation error below, how to resolve? HOT 2
- async-graphql integration example? HOT 2
- `ntex::time::timeout` is not accurate HOT 3
- [Bug] Unable to set length manually HOT 4
- Moving websocket to a feature HOT 3
- [ntex-server](Bug) Duplicates ctrlc_handler registration under win causing process crash HOT 2
- Program panicks upon ctrl+c HOT 3
- Wrong feature gate in ntex/ntex-net/src/compat.rs HOT 1
- Ntex runtime panic HOT 20
- How to convert web::types::Payload to AsyncRead HOT 1
- Is there a feature comparison with other frameworks ? HOT 1
- The `insert` method for `Extensions` does not return existed value HOT 1
- Compilation failed for windows HOT 2
- http client closes h2 connection HOT 1
- Can't access state in middleware HOT 6
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 ntex.