Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL Server example is outdated #307

Open
creikey opened this issue Dec 25, 2019 · 2 comments
Open

SSL Server example is outdated #307

creikey opened this issue Dec 25, 2019 · 2 comments

Comments

@creikey
Copy link

creikey commented Dec 25, 2019

Uses the method SslAcceptorBuilder::mozilla_intermediate which has been deprecated in the ssl package since 0.9.14

@creikey
Copy link
Author

creikey commented Dec 25, 2019

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());

@Darkspirit
Copy link

With openssl 0.10.24 and later, mozilla_intermediate_v5() should be used. The old mozilla_intermediate() does not have TLS 1.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants