mirror of
https://github.com/ntex-rs/ntex.git
synced 2025-04-03 21:07:39 +03:00
parent
e151b1eff1
commit
7960b550c9
84 changed files with 676 additions and 821 deletions
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "ntex-tls"
|
||||
version = "0.2.4"
|
||||
version = "0.3.0"
|
||||
authors = ["ntex contributors <team@ntex.rs>"]
|
||||
description = "An implementation of SSL streams for ntex backed by OpenSSL"
|
||||
keywords = ["network", "framework", "async", "futures"]
|
||||
|
@ -26,20 +26,20 @@ rustls = ["tls_rust"]
|
|||
|
||||
[dependencies]
|
||||
ntex-bytes = "0.1.19"
|
||||
ntex-io = "0.2.7"
|
||||
ntex-util = "0.2.0"
|
||||
ntex-service = "1.0.0"
|
||||
ntex-io = "0.3.0"
|
||||
ntex-util = "0.3.0"
|
||||
ntex-service = "1.2.0"
|
||||
log = "0.4"
|
||||
pin-project-lite = "0.2"
|
||||
|
||||
# openssl
|
||||
tls_openssl = { version="0.10", package = "openssl", optional = true }
|
||||
tls_openssl = { version = "0.10", package = "openssl", optional = true }
|
||||
|
||||
# rustls
|
||||
tls_rust = { version = "0.21", package = "rustls", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
ntex = { version = "0.6.3", features = ["openssl", "rustls", "tokio"] }
|
||||
ntex = { version = "0.7.0", features = ["openssl", "rustls", "tokio"] }
|
||||
env_logger = "0.10"
|
||||
rustls-pemfile = { version = "1.0" }
|
||||
webpki-roots = { version = "0.22" }
|
||||
webpki-roots = { version = "0.23" }
|
||||
|
|
|
@ -2,7 +2,7 @@ use std::task::{Context, Poll};
|
|||
use std::{error::Error, future::Future, marker::PhantomData, pin::Pin};
|
||||
|
||||
use ntex_io::{Filter, FilterFactory, Io, Layer};
|
||||
use ntex_service::{Service, ServiceFactory};
|
||||
use ntex_service::{Ctx, Service, ServiceFactory};
|
||||
use ntex_util::{future::Ready, time::Millis};
|
||||
use tls_openssl::ssl::SslAcceptor;
|
||||
|
||||
|
@ -95,7 +95,7 @@ impl<F: Filter> Service<Io<F>> for AcceptorService<F> {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
fn call(&self, req: Io<F>) -> Self::Future<'_> {
|
||||
fn call<'a>(&'a self, req: Io<F>, _: Ctx<'a, Self>) -> Self::Future<'a> {
|
||||
AcceptorServiceResponse {
|
||||
_guard: self.conns.get(),
|
||||
fut: self.acceptor.clone().create(req),
|
||||
|
|
|
@ -4,7 +4,7 @@ use std::{future::Future, io, marker::PhantomData, pin::Pin, sync::Arc};
|
|||
use tls_rust::ServerConfig;
|
||||
|
||||
use ntex_io::{Filter, FilterFactory, Io, Layer};
|
||||
use ntex_service::{Service, ServiceFactory};
|
||||
use ntex_service::{Ctx, Service, ServiceFactory};
|
||||
use ntex_util::{future::Ready, time::Millis};
|
||||
|
||||
use super::{TlsAcceptor, TlsFilter};
|
||||
|
@ -93,7 +93,7 @@ impl<F: Filter> Service<Io<F>> for AcceptorService<F> {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
fn call(&self, req: Io<F>) -> Self::Future<'_> {
|
||||
fn call<'a>(&'a self, req: Io<F>, _: Ctx<'a, Self>) -> Self::Future<'a> {
|
||||
AcceptorServiceFut {
|
||||
_guard: self.conns.get(),
|
||||
fut: self.acceptor.clone().create(req),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue