Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions boring/src/x509/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,23 @@ foreign_type_and_impl_send_sync! {
pub struct X509Store;
}

impl Clone for X509Store {
fn clone(&self) -> Self {
(**self).to_owned()
}
}

impl ToOwned for X509StoreRef {
type Owned = X509Store;

fn to_owned(&self) -> Self::Owned {
unsafe {
ffi::X509_STORE_up_ref(self.as_ptr());
X509Store::from_ptr(self.as_ptr())
}
}
}

impl X509StoreRef {
/// **Warning: this method is unsound**
///
Expand Down
Loading