File tree 2 files changed +7
-13
lines changed
2 files changed +7
-13
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " redis-async"
3
- version = " 0.17.1 "
3
+ version = " 0.17.2 "
4
4
authors = [" Ben Ashford <benashford@users.noreply.github.com>" ]
5
5
license = " MIT/Apache-2.0"
6
6
readme = " README.md"
@@ -20,9 +20,9 @@ pin-project = "1.0"
20
20
socket2 = { version = " 0.5" , features = [" all" ] }
21
21
tokio = { version = " 1.0" , features = [" rt" , " net" , " time" ] }
22
22
tokio-native-tls = { version = " 0.3.0" , optional = true }
23
- tokio-rustls = { version = " 0.24 " , optional = true }
23
+ tokio-rustls = { version = " 0.26 " , optional = true }
24
24
tokio-util = { version = " 0.7" , features = [" codec" ] }
25
- webpki-roots = { version = " 0.23 " , optional = true }
25
+ webpki-roots = { version = " 0.26 " , optional = true }
26
26
27
27
[features ]
28
28
default = []
Original file line number Diff line number Diff line change @@ -132,20 +132,13 @@ pub async fn connect_tls(
132
132
) -> Result < RespConnection , error:: Error > {
133
133
use std:: sync:: Arc ;
134
134
use tokio_rustls:: {
135
- rustls:: { ClientConfig , OwnedTrustAnchor , RootCertStore } ,
135
+ rustls:: { ClientConfig , RootCertStore } ,
136
136
TlsConnector ,
137
137
} ;
138
138
139
139
let mut root_store = RootCertStore :: empty ( ) ;
140
- root_store. add_trust_anchors ( webpki_roots:: TLS_SERVER_ROOTS . 0 . iter ( ) . map ( |ta| {
141
- OwnedTrustAnchor :: from_subject_spki_name_constraints (
142
- ta. subject ,
143
- ta. spki ,
144
- ta. name_constraints ,
145
- )
146
- } ) ) ;
140
+ root_store. extend ( webpki_roots:: TLS_SERVER_ROOTS . iter ( ) . cloned ( ) ) ;
147
141
let config = ClientConfig :: builder ( )
148
- . with_safe_defaults ( )
149
142
. with_root_certificates ( root_store)
150
143
. with_no_client_auth ( ) ;
151
144
let connector = TlsConnector :: from ( Arc :: new ( config) ) ;
@@ -161,7 +154,8 @@ pub async fn connect_tls(
161
154
162
155
let stream = connector
163
156
. connect (
164
- host. try_into ( )
157
+ String :: from ( host)
158
+ . try_into ( )
165
159
. map_err ( |_err| error:: Error :: InvalidDnsName ) ?,
166
160
tcp_stream,
167
161
)
You can’t perform that action at this time.
0 commit comments