Home GnuPG
Diffusion Scute 8d6099136c76

Check whether the card has a RNG.
8d6099136c76Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Check whether the card has a RNG.

* src/agent.c (learn_status_cb): Learn from the agent whether the
card supports GET CHALLENGE.
* src/agent.h (struct agent_card_info_s): New member rng_available.
* src/p11-gettokeninfo (C_GetTokenInfo): Set CKF_RNG flag.
* src/slots.c (slot_token_has_rng): New function.
* src/slots.h (slot_token_has_rng): New prototype.
Parse card capabilities

Now that C_GenerateRandom is implemented, we can inform the client
application that a RNG is available on the token.

But support for the GET CHALLENGE operation does not seem to be
mandatory as per the OpenPGP Card specification, so we should
first make sure that the inserted token does support it.

The code for parsing the EXTCAP line is taken from GnuPG, with
Werner's permission to reuse it under the same licensing terms as
the rest of Scute.

  • Signed-off-by: Damien Goutte-Gattat <dgouttegattat@incenp.org>

Details

Provenance
gouttegdAuthored on Apr 6 2016, 9:16 AM
justusCommitted on May 23 2016, 11:39 AM
Parents
rS764de881a38d: Implement C_GenerateRandom.
Branches
Unknown
Tags
Unknown