Open creikey opened 4 years ago
I don't know enough about rust to confidently open a PR for this, but I think the code:
let acceptor = Rc::new(SslAcceptorBuilder::mozilla_intermediate(
SslMethod::tls(),
&pkey,
&cert,
std::iter::empty::<X509Ref>(),
).unwrap().build());
Can be replaced with this new code that works with the most recent opensll api:
let mut acceptor_builder = SslAcceptor::mozilla_intermediate(SslMethod::tls()).unwrap();
acceptor_builder.set_private_key(&pkey).unwrap();
acceptor_builder.set_certificate(&cert).unwrap();
let acceptor = Rc::new(acceptor_builder.build());
With openssl 0.10.24 and later, mozilla_intermediate_v5() should be used. The old mozilla_intermediate() does not have TLS 1.3.
Uses the method
SslAcceptorBuilder::mozilla_intermediate
which has been deprecated in thessl
package since0.9.14