#[unsafe(no_mangle)]pub unsafe extern "C" fn pamoja_updater_adopt(
updater: *mut PamojaUpdater,
bytes: *const u8,
len: usize,
has_now: bool,
now: u64,
out_delegation: *mut PamojaDelegation,
) -> PamojaStatusExpand description
Adopts a delegation, so releases signed by the key it names are accepted.
§Arguments
updater- the updater.bytes- the signed delegation envelope.len- the length ofbytes.has_now-trueif the device has a clock,falseif it does not.now- seconds since the Unix epoch, read only whenhas_nowistrue.out_delegation- receives the adopted delegation, or may be null.
§Returns
PamojaStatus::Ok if the delegation was signed by the anchor, is newer
than the one held, and has not expired.
§Safety
updater must be a live handle from pamoja_updater_new, bytes must
point to at least len readable bytes or be null when len is 0, and
out_delegation must be writable or null.