aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scd/app-openpgp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c
index 8a1d30d5b..ccc360fc8 100644
--- a/scd/app-openpgp.c
+++ b/scd/app-openpgp.c
@@ -2357,10 +2357,15 @@ verify_chv2 (app_t app,
int rc;
char *pinvalue;
int pinlen;
+ int i;
if (app->did_chv2)
return 0; /* We already verified CHV2. */
+ /* Make sure we have load the public keys. */
+ for (i = 0; i < 3; i++)
+ get_public_key (app, i);
+
if (app->app_local->pk[1].key || app->app_local->pk[2].key)
{
rc = verify_a_chv (app, pincb, pincb_arg, 2, 0, &pinvalue, &pinlen);