File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -406,7 +406,15 @@ impl RawClient<ElectrumSslStream> {
406406 ) -> Result < Self , Error > {
407407 use std:: convert:: TryFrom ;
408408
409- let builder = ClientConfig :: builder ( ) ;
409+ #[ cfg( feature = "use-rustls" ) ]
410+ use rustls:: crypto:: aws_lc_rs as crypto_provider;
411+ #[ cfg( feature = "use-rustls-ring" ) ]
412+ use rustls:: crypto:: ring as crypto_provider;
413+
414+ let builder =
415+ ClientConfig :: builder_with_provider ( Arc :: new ( crypto_provider:: default_provider ( ) ) )
416+ . with_safe_default_protocol_versions ( )
417+ . map_err ( Error :: CouldNotCreateConnection ) ?;
410418
411419 let config = if validate_domain {
412420 socket_addr. domain ( ) . ok_or ( Error :: MissingDomain ) ?;
@@ -426,10 +434,7 @@ impl RawClient<ElectrumSslStream> {
426434 builder
427435 . dangerous ( )
428436 . with_custom_certificate_verifier ( std:: sync:: Arc :: new (
429- #[ cfg( feature = "use-rustls" ) ]
430- danger:: NoCertificateVerification :: new ( rustls:: crypto:: aws_lc_rs:: default_provider ( ) ) ,
431- #[ cfg( feature = "use-rustls-ring" ) ]
432- danger:: NoCertificateVerification :: new ( rustls:: crypto:: ring:: default_provider ( ) ) ,
437+ danger:: NoCertificateVerification :: new ( crypto_provider:: default_provider ( ) ) ,
433438 ) )
434439 . with_no_client_auth ( )
435440 } ;
You can’t perform that action at this time.
0 commit comments