Skip to main content

with_key

Function with_key 

Source
pub fn with_key(
    host: &str,
    existing: Option<&[u8]>,
    key: &SigningKey,
    valid_from: &str,
) -> Result<Vec<u8>, Error>
Expand description

The key document of host publishing key from valid_from, after the keys of existing (a document already published for host, if any): rotation as SPEC 9.5 says, each existing key without a valid_to (or with a later one) ending at valid_from. A key already in existing is not added again. The result is canonical JSON, checked by 9.2.