summaryrefslogtreecommitdiffstats
path: root/scd
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2020-03-31 11:57:19 +0200
committerWerner Koch <wk@gnupg.org>2020-03-31 11:57:19 +0200
commit2bdd4fc7b6cfd9ac5410d20f1cee66567a6b24c5 (patch)
tree1fef5c9b13a2fdc6abbc256088becf067b6cb4e0 /scd
parentscd: Add function for binary read in extended mode. (diff)
downloadgnupg2-2bdd4fc7b6cfd9ac5410d20f1cee66567a6b24c5.tar.xz
gnupg2-2bdd4fc7b6cfd9ac5410d20f1cee66567a6b24c5.zip
scd:p15: Read certificates in extended mode.
* scd/app-p15.c (readcert_by_cdf): Allow reading in extended mode. -- Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'scd')
-rw-r--r--scd/app-p15.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/scd/app-p15.c b/scd/app-p15.c
index 6477c7296..f9de4fb58 100644
--- a/scd/app-p15.c
+++ b/scd/app-p15.c
@@ -660,6 +660,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
@@ -2717,8 +2719,8 @@ readcert_by_cdf (app_t app, cdf_object_t cdf,
if (err)
goto leave;
- err = iso7816_read_binary (app_get_slot (app), 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)