From bb6ccdb9fb34f427ae78f8e0ac4e67e687ce92d2 Mon Sep 17 00:00:00 2001 From: "viktor.tarasov" Date: Mon, 1 Mar 2010 13:36:02 +0000 Subject: [PATCH] pkcs15init oberthur: no extractable key; for generated key set reference from the key's path git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4073 c6295689-39f2-0310-b995-f0e70906c6a9 --- src/pkcs15init/pkcs15-oberthur.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/pkcs15init/pkcs15-oberthur.c b/src/pkcs15init/pkcs15-oberthur.c index b46a4a80..cd14d01b 100644 --- a/src/pkcs15init/pkcs15-oberthur.c +++ b/src/pkcs15init/pkcs15-oberthur.c @@ -527,10 +527,6 @@ cosm_new_file(struct sc_profile *profile, struct sc_card *card, desc = "DSA public key"; _template = "template-public-key"; break; - case SC_PKCS15_TYPE_PRKEY: - desc = "extractable private key"; - _template = "template-extractable-key"; - break; case SC_PKCS15_TYPE_CERT: desc = "certificate"; _template = "template-certificate"; @@ -686,7 +682,7 @@ cosm_generate_key(struct sc_profile *profile, struct sc_pkcs15_card *p15card, memcpy(pubkey->u.rsa.exponent.data, "\x01\x00\x01", 3); memcpy(pubkey->u.rsa.modulus.data, args.pubkey, args.pubkey_len); - key_info->key_reference = 1; + key_info->key_reference = prkf->path.value[prkf->path.len - 1] & 0xFF; key_info->path = prkf->path; sc_debug(ctx, "cosm_generate_key() now delete temporary public key\n");