add_certificate

Function add_certificate 

Source
pub fn add_certificate(
    raw_signer: &dyn RawSigningKey,
    flags: OpenPgpKeyUsageFlags,
    user_id: OpenPgpUserId,
    created_at: DateTime<Utc>,
    version: OpenPgpVersion,
) -> Result<Vec<u8>, Error>
Expand description

Generates an OpenPGP certificate for a RawSigningKey implementation.

ยงErrors

Returns an error if

  • conversion of the HSM public key to OpenPGP public key fails
  • signing the certificate with the HSM key fails
  • writing the resulting certificate to buffer fails