Add X509VerifyParamRef::copy_from (#361)
This commit is contained in:
parent
2bc82e8d1c
commit
7a52fbbe99
|
|
@ -182,4 +182,12 @@ impl X509VerifyParamRef {
|
||||||
pub fn set_depth(&mut self, depth: c_int) {
|
pub fn set_depth(&mut self, depth: c_int) {
|
||||||
unsafe { ffi::X509_VERIFY_PARAM_set_depth(self.as_ptr(), depth) }
|
unsafe { ffi::X509_VERIFY_PARAM_set_depth(self.as_ptr(), depth) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Copies parameters from `src`.
|
||||||
|
///
|
||||||
|
/// If a parameter is unset in `src`, the existing value in `self`` is preserved.
|
||||||
|
#[corresponds(X509_VERIFY_PARAM_set1)]
|
||||||
|
pub fn copy_from(&mut self, src: &Self) -> Result<(), ErrorStack> {
|
||||||
|
unsafe { cvt(ffi::X509_VERIFY_PARAM_set1(self.as_ptr(), src.as_ptr())).map(|_| ()) }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue