nethsm::openpgp

Function sign_hasher_state

source
pub fn sign_hasher_state(
    nethsm: &NetHsm,
    key_id: &KeyId,
    state: impl Digest + Clone + Write,
) -> Result<Vec<u8>, Error>
Expand description

Generates an OpenPGP signature based on provided hasher state.

Signs the hasher state using the key identified by key_id and returns a binary OpenPGP data signature.

This call requires using a user in the Operator role, which carries a tag (see add_user_tag) matching one of the tags of the targeted key (see add_key_tag).

§Namespaces

§Errors

Returns an crate::Error::Api if creating an OpenPGP signature for the hasher state fails: