pub fn bind_into_certificate(
tx: &mut Card<Transaction<'_>>,
sig: PublicKey,
dec: Option<PublicKey>,
aut: Option<PublicKey>,
user_ids: &[String],
user_pin: Option<SecretString>,
pinpad_prompt: &dyn Fn(),
touch_prompt: &(dyn Fn() + Send + Sync),
) -> Result<SignedPublicKey, Error>Expand description
Bind the component keys on a card into a SignedPublicKey.
NOTE: This function makes a number of assumptions that don’t apply to all OpenPGP keys! The resulting OpenPGP public key object may be unfit for purpose!
This function assumes that the signing slot of the card serves as the primary key, and uses it to issue binding self-signatures.
This function sets the certification- and data-signature key flags on the sig component ke.
At least one User ID is required. The first User ID is marked as “primary user id”.
If user_pin is None, pinpad verification is attempted.
pinpad_prompt is called to notify the user when pinpad input (of the
User PIN) is required.
touch_prompt is called to notify the user when touch confirmation is
required on the card for a signing operation.
FIXME: Accept optional metadata for user_id binding(s)?