Function sign_request

Source
pub(crate) fn sign_request(
    reader: impl Read,
    writer: impl Write,
) -> Result<(), Error>
Expand description

Signs the signing request in reader and write the response to the writer.

ยงErrors

Returns an error if:

  • a Request can be created from reader,
  • the Request does not use OpenPGP v4,
  • the Request is not version 1,
  • a [Sha512] hasher state can not be created from the Request,
  • no [NetHsm] and [KeyId] can be retrieved for the calling user,
  • a signature can not be created over the hasher state,
  • or the Response can not be written to the writer.