/// When called from a query call, returns the data certificate authenticating
/// certified_data set by this canister.
///
/// Returns None if called not from a query call.
When called from a query call, returns the data certificate authenticating
certified_data set by this canister.

Returns None if called not from a query call.
When called from a query call returns the data certificate authenticating certified_data set by this canister . Returns None if called not from a query call .
pub fn data_certificate() -> Option<Vec<u8>> {
    if unsafe { ic0::data_certificate_present() } == 0 {
        return None;
    }
    let n = unsafe { ic0::data_certificate_size() };
    let mut buf = vec![0u8; n as usize];
    unsafe {
        ic0::data_certificate_copy(buf.as_mut_ptr() as u32, 0u32, n);
    }
    Some(buf)
}
pub fn data_certificate ( ) -> Option < Vec < u8 > > { if unsafe { ic0 :: data_certificate_present ( ) } == 0 { return None ; } let n = unsafe { ic0 :: data_certificate_size ( ) } ; let mut buf = vec ! [ 0u8 n as usize ] ; unsafe { ic0 :: data_certificate_copy ( buf . as_mut_ptr ( ) as u32 , 0u32 , n ) ; } Some ( buf ) }
When called from a query call, returns the data certificate authenticating
certified_data set by this canister.
When called from a query call returns the data certificate authenticating certified_data set by this canister .