1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 22:49:21 +02:00

bump connect and tls versions (#1655)

This commit is contained in:
Rob Ede
2020-09-09 09:20:54 +01:00
committed by GitHub
parent c54d73e0bb
commit 9d0534999d
13 changed files with 60 additions and 49 deletions

View File

@ -97,7 +97,7 @@ where
mod openssl {
use actix_service::{fn_factory, fn_service};
use actix_tls::openssl::{Acceptor, SslAcceptor, SslStream};
use actix_tls::{openssl::HandshakeError, SslError};
use actix_tls::{openssl::HandshakeError, TlsError};
use super::*;
@ -117,12 +117,12 @@ mod openssl {
Config = (),
Request = TcpStream,
Response = (),
Error = SslError<HandshakeError<TcpStream>, DispatchError>,
Error = TlsError<HandshakeError<TcpStream>, DispatchError>,
InitError = S::InitError,
> {
pipeline_factory(
Acceptor::new(acceptor)
.map_err(SslError::Ssl)
.map_err(TlsError::Tls)
.map_init_err(|_| panic!()),
)
.and_then(fn_factory(|| {
@ -131,7 +131,7 @@ mod openssl {
ok((io, peer_addr))
}))
}))
.and_then(self.map_err(SslError::Service))
.and_then(self.map_err(TlsError::Service))
}
}
}
@ -140,7 +140,7 @@ mod openssl {
mod rustls {
use super::*;
use actix_tls::rustls::{Acceptor, ServerConfig, TlsStream};
use actix_tls::SslError;
use actix_tls::TlsError;
use std::io;
impl<S, B> H2Service<TlsStream<TcpStream>, S, B>
@ -159,7 +159,7 @@ mod rustls {
Config = (),
Request = TcpStream,
Response = (),
Error = SslError<io::Error, DispatchError>,
Error = TlsError<io::Error, DispatchError>,
InitError = S::InitError,
> {
let protos = vec!["h2".to_string().into()];
@ -167,7 +167,7 @@ mod rustls {
pipeline_factory(
Acceptor::new(config)
.map_err(SslError::Ssl)
.map_err(TlsError::Tls)
.map_init_err(|_| panic!()),
)
.and_then(fn_factory(|| {
@ -176,7 +176,7 @@ mod rustls {
ok((io, peer_addr))
}))
}))
.and_then(self.map_err(SslError::Service))
.and_then(self.map_err(TlsError::Service))
}
}
}