Skip to content

Revisit Clone impl for X509Store #362

@nox

Description

@nox

Implementing Clone for X509Store has been attempted twice in #108 and #339.

The latest revert in #353 documented this shouldn't be done because of SslContextBuilder::set_cert_store and SslContextBuilder::cert_store_mut.

let mut ctx = SslContext::builder().unwrap();
let store = X509Store::new().unwrap();

ctx.set_cert_store(store.clone());

// This is bad.
let aliased_store = ctx.cert_store_mut();

Maybe we should just remove cert_store_mut and make people use set_cert_store only?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions