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 subkeys of a card into a SignedPublicKey
.
At least one User ID is required.
This function assumes that the signing slot of the card serves as the primary key, and uses it to issue binding self-signatures.
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 for a signing operation.
FIXME: Accept optional metadata for user_id binding(s)?