1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

scd:p15: Read certificates in extended mode.

* scd/app-p15.c (readcert_by_cdf): Allow reading in extended mode.
* scd/app-common.h (app_get_slot): New.
--

Signed-off-by: Werner Koch <wk@gnupg.org>

(Back ported from master)

Added app_get_slot.
This commit is contained in:
Werner Koch 2020-03-31 11:57:19 +02:00
parent 64142caafe
commit 368f006a28
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
2 changed files with 17 additions and 1 deletions

View file

@ -659,6 +659,8 @@ read_ef_odf (app_t app, unsigned short odf_fid)
app->app_local->home_df = home_df;
log_info ("p15: application directory detected as 0x%04hX\n",
home_df);
/* We assume that direct path selection is possible. */
app->app_local->direct_path_selection = 1;
}
/* We only allow a full path if all files are at the same
@ -2713,7 +2715,8 @@ readcert_by_cdf (app_t app, cdf_object_t cdf,
if (err)
goto leave;
err = iso7816_read_binary (app->slot, cdf->off, cdf->len, &buffer, &buflen);
err = iso7816_read_binary_ext (app_get_slot (app), 1, cdf->off, cdf->len,
&buffer, &buflen);
if (!err && (!buflen || *buffer == 0xff))
err = gpg_error (GPG_ERR_NOT_FOUND);
if (err)