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>