mirror of
https://github.com/ntex-rs/ntex.git
synced 2025-04-03 21:07:39 +03:00
Upgrade deps (#230)
This commit is contained in:
parent
38cadcee92
commit
fbd6a4f44d
6 changed files with 37 additions and 22 deletions
|
@ -42,4 +42,4 @@ tls_rust = { version = "0.21", package = "rustls", optional = true }
|
|||
ntex = { version = "0.7.0", features = ["openssl", "rustls", "tokio"] }
|
||||
env_logger = "0.10"
|
||||
rustls-pemfile = "1.0"
|
||||
webpki-roots = "0.23"
|
||||
webpki-roots = "0.25"
|
||||
|
|
|
@ -10,15 +10,13 @@ async fn main() -> io::Result<()> {
|
|||
|
||||
// rustls config
|
||||
let mut cert_store = RootCertStore::empty();
|
||||
cert_store.add_server_trust_anchors(webpki_roots::TLS_SERVER_ROOTS.0.iter().map(
|
||||
|ta| {
|
||||
OwnedTrustAnchor::from_subject_spki_name_constraints(
|
||||
ta.subject,
|
||||
ta.spki,
|
||||
ta.name_constraints,
|
||||
)
|
||||
},
|
||||
));
|
||||
cert_store.add_trust_anchors(webpki_roots::TLS_SERVER_ROOTS.iter().map(|ta| {
|
||||
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)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Changes
|
||||
|
||||
## [0.7.6] - 2023-10-xx
|
||||
## [0.7.6] - 2023-10-16
|
||||
|
||||
* Upgrade ntex-h2 to 0.4
|
||||
|
||||
|
|
|
@ -71,9 +71,9 @@ bitflags = "2.4"
|
|||
log = "0.4"
|
||||
num_cpus = "1.13"
|
||||
nanorand = { version = "0.7.0", default-features = false, features = ["std", "wyrand"] }
|
||||
polling = "2.5.1"
|
||||
polling = "3.2.0"
|
||||
pin-project-lite = "0.2"
|
||||
regex = { version = "1.7.0", default-features = false, features = ["std"] }
|
||||
regex = { version = "1.10.1", default-features = false, features = ["std"] }
|
||||
sha-1 = "0.10"
|
||||
serde = { version = "1.0", features=["derive"] }
|
||||
socket2 = "0.5"
|
||||
|
@ -95,7 +95,7 @@ tls-openssl = { version="0.10", package = "openssl", optional = true }
|
|||
|
||||
# rustls
|
||||
tls-rustls = { version = "0.21", package = "rustls", optional = true }
|
||||
webpki-roots = { version = "0.23", optional = true }
|
||||
webpki-roots = { version = "0.25.2", optional = true }
|
||||
|
||||
# compression
|
||||
brotli2 = { version="0.3.2", optional = true }
|
||||
|
@ -109,4 +109,4 @@ futures-util = "0.3"
|
|||
tls-openssl = { version="0.10", package = "openssl" }
|
||||
tls-rustls = { version = "0.21", package="rustls", features = ["dangerous_configuration"] }
|
||||
rustls-pemfile = "1.0"
|
||||
webpki-roots = "0.23"
|
||||
webpki-roots = "0.25"
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
use std::{
|
||||
cell::Cell, fmt, io, sync::mpsc, sync::Arc, thread, time::Duration, time::Instant,
|
||||
};
|
||||
use std::time::{Duration, Instant};
|
||||
use std::{cell::Cell, fmt, io, num::NonZeroUsize, sync::mpsc, sync::Arc, thread};
|
||||
|
||||
use polling::{Event, Poller};
|
||||
use polling::{Event, Events, Poller};
|
||||
|
||||
use crate::rt::System;
|
||||
use crate::time::{sleep, Millis};
|
||||
|
@ -202,7 +201,7 @@ impl Accept {
|
|||
}
|
||||
|
||||
// Create storage for events
|
||||
let mut events = Vec::with_capacity(128);
|
||||
let mut events = Events::with_capacity(NonZeroUsize::new(512).unwrap());
|
||||
|
||||
loop {
|
||||
if let Err(e) = self.poller.wait(&mut events, None) {
|
||||
|
@ -241,7 +240,7 @@ impl Accept {
|
|||
let result = if info.registered.get() {
|
||||
self.poller.modify(&info.sock, Event::readable(idx))
|
||||
} else {
|
||||
self.poller.add(&info.sock, Event::readable(idx))
|
||||
unsafe { self.poller.add(&info.sock, Event::readable(idx)) }
|
||||
};
|
||||
if let Err(err) = result {
|
||||
if err.kind() == io::ErrorKind::WouldBlock {
|
||||
|
|
|
@ -107,8 +107,18 @@ impl Listener {
|
|||
#[cfg(unix)]
|
||||
mod listener_impl {
|
||||
use super::*;
|
||||
use std::os::fd::{AsFd, BorrowedFd};
|
||||
use std::os::unix::io::{AsRawFd, RawFd};
|
||||
|
||||
impl AsFd for Listener {
|
||||
fn as_fd(&self) -> BorrowedFd<'_> {
|
||||
match *self {
|
||||
Listener::Tcp(ref lst) => lst.as_fd(),
|
||||
Listener::Uds(ref lst) => lst.as_fd(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl AsRawFd for Listener {
|
||||
fn as_raw_fd(&self) -> RawFd {
|
||||
match *self {
|
||||
|
@ -122,7 +132,15 @@ mod listener_impl {
|
|||
#[cfg(windows)]
|
||||
mod listener_impl {
|
||||
use super::*;
|
||||
use std::os::windows::io::{AsRawSocket, RawSocket};
|
||||
use std::os::windows::io::{AsRawSocket, AsSocket, BorrowedSocket, RawSocket};
|
||||
|
||||
impl AsSocket for Listener {
|
||||
fn as_socket(&self) -> BorrowedSocket<'_> {
|
||||
match *self {
|
||||
Listener::Tcp(ref lst) => lst.as_socket(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl AsRawSocket for Listener {
|
||||
fn as_raw_socket(&self) -> RawSocket {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue