pub fn add_certificate(
raw_signer: &dyn RawSigningKey,
flags: OpenPgpKeyUsageFlags,
user_ids: &[OpenPgpUserId],
created_at: Timestamp,
version: OpenPgpVersion,
) -> Result<Vec<u8>, Error>Expand description
Generates an OpenPGP certificate for a RawSigningKey implementation.
The list of User IDs must not be empty. The first User ID is marked as primary.
ยงErrors
Returns an error if
- conversion of the HSM public key to OpenPGP public key fails
- an empty list of user IDs is passed
- signing the certificate with the HSM key fails
- writing the resulting certificate to buffer fails