pub fn sign_hasher_state(
nethsm: &NetHsm,
key_id: &KeyId,
state: Sha512,
) -> Result<String, Error>Expand description
Generates an armored 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
Operatorusers in a namespace only have access to keys in their own namespace.- System-wide
Operatorusers only have access to system-wide keys.
§Errors
Returns an crate::Error::Api if creating an OpenPGP signature for the hasher state fails:
- the NetHSM is not in
Operationalstate - no key identified by
key_idexists on the NetHSM - the
Operatoruser does not have access to the key (e.g. different namespace) - the
Operatoruser does not carry a tag matching one of the key tags - the used
Credentialsare not correct - the used
Credentialsare not those of a user in theOperatorrole