Skip to content

Commit

Permalink
fix rustls_root_cert_store CastPtr RustType
Browse files Browse the repository at this point in the history
  • Loading branch information
cpu committed Oct 4, 2023
1 parent f12aa12 commit 50d163a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/cipher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ use crate::error::rustls_result;
use crate::rslice::{rustls_slice_bytes, rustls_str};
use crate::rustls_result::AlreadyUsed;
use crate::{
error, ffi_panic_boundary, try_mut_from_ptr, try_ref_from_ptr, try_slice, ArcCastPtr,
BoxCastPtr, CastPtr,
error, ffi_panic_boundary, try_arc_from_ptr, try_mut_from_ptr, try_ref_from_ptr, try_slice,
ArcCastPtr, BoxCastPtr, CastPtr,
};
use rustls_result::NullParameter;

Expand Down Expand Up @@ -530,7 +530,7 @@ impl rustls_root_cert_store_builder {
Some(b) => b,
};

ArcCastPtr::set_mut_ptr(root_cert_store_out, builder.roots.clone().into());
ArcCastPtr::set_mut_ptr(root_cert_store_out, builder.roots.clone());

rustls_result::Ok
}
Expand Down Expand Up @@ -559,7 +559,7 @@ pub struct rustls_root_cert_store {
}

impl CastPtr for rustls_root_cert_store {
type RustType = Arc<RootCertStore>;
type RustType = RootCertStore;
}

impl ArcCastPtr for rustls_root_cert_store {}
Expand Down Expand Up @@ -647,9 +647,9 @@ impl rustls_web_pki_client_cert_verifier_builder {
store: *const rustls_root_cert_store,
) -> *mut rustls_web_pki_client_cert_verifier_builder {
ffi_panic_boundary! {
let store = try_ref_from_ptr!(store);
let store = try_arc_from_ptr!(store);
let builder = ClientCertVerifierBuilder {
roots: store.clone(),
roots: store,
crls: Vec::default(),
allow_anonymous: false,
};
Expand Down

0 comments on commit 50d163a

Please sign in to comment.