pub struct OcspResponse(/* private fields */);
Implementations§
Source§impl OcspResponse
impl OcspResponse
Sourcepub fn create(
status: OcspResponseStatus,
body: Option<&OcspBasicResponseRef>,
) -> Result<OcspResponse, ErrorStack>
pub fn create( status: OcspResponseStatus, body: Option<&OcspBasicResponseRef>, ) -> Result<OcspResponse, ErrorStack>
Creates an OCSP response from the status and optional body.
A body should only be provided if status
is RESPONSE_STATUS_SUCCESSFUL
.
This corresponds to OCSP_response_create
.
Sourcepub fn from_der(der: &[u8]) -> Result<OcspResponse, ErrorStack>
pub fn from_der(der: &[u8]) -> Result<OcspResponse, ErrorStack>
Deserializes a DER-encoded OCSP response.
This corresponds to d2i_OCSP_RESPONSE
.
Methods from Deref<Target = OcspResponseRef>§
Sourcepub fn to_der(&self) -> Result<Vec<u8>, ErrorStack>
pub fn to_der(&self) -> Result<Vec<u8>, ErrorStack>
Serializes the response to its standard DER encoding.
This corresponds to i2d_OCSP_RESPONSE
.
Sourcepub fn status(&self) -> OcspResponseStatus
pub fn status(&self) -> OcspResponseStatus
Returns the status of the response.
This corresponds to OCSP_response_status
.
Sourcepub fn basic(&self) -> Result<OcspBasicResponse, ErrorStack>
pub fn basic(&self) -> Result<OcspBasicResponse, ErrorStack>
Returns the basic response.
This will only succeed if status()
returns RESPONSE_STATUS_SUCCESSFUL
.
This corresponds to OCSP_response_get1_basic
.
Trait Implementations§
Source§impl AsRef<OcspResponseRef> for OcspResponse
impl AsRef<OcspResponseRef> for OcspResponse
Source§fn as_ref(&self) -> &OcspResponseRef
fn as_ref(&self) -> &OcspResponseRef
Source§impl Borrow<OcspResponseRef> for OcspResponse
impl Borrow<OcspResponseRef> for OcspResponse
Source§fn borrow(&self) -> &OcspResponseRef
fn borrow(&self) -> &OcspResponseRef
Source§impl Deref for OcspResponse
impl Deref for OcspResponse
Source§type Target = OcspResponseRef
type Target = OcspResponseRef
Source§fn deref(&self) -> &OcspResponseRef
fn deref(&self) -> &OcspResponseRef
Source§impl DerefMut for OcspResponse
impl DerefMut for OcspResponse
Source§fn deref_mut(&mut self) -> &mut OcspResponseRef
fn deref_mut(&mut self) -> &mut OcspResponseRef
Source§impl Drop for OcspResponse
impl Drop for OcspResponse
Source§impl ForeignType for OcspResponse
impl ForeignType for OcspResponse
Source§type CType = OCSP_RESPONSE
type CType = OCSP_RESPONSE
Source§type Ref = OcspResponseRef
type Ref = OcspResponseRef
Source§unsafe fn from_ptr(ptr: *mut OCSP_RESPONSE) -> OcspResponse
unsafe fn from_ptr(ptr: *mut OCSP_RESPONSE) -> OcspResponse
Source§fn as_ptr(&self) -> *mut OCSP_RESPONSE
fn as_ptr(&self) -> *mut OCSP_RESPONSE
impl Send for OcspResponse
impl Sync for OcspResponse
Auto Trait Implementations§
impl Freeze for OcspResponse
impl RefUnwindSafe for OcspResponse
impl Unpin for OcspResponse
impl UnwindSafe for OcspResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes