- Added support for extractable keys on the Cryptoflex

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@575 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
jey 2002-04-19 17:02:15 +00:00
parent 3dccd63989
commit 9251d131ae
2 changed files with 17 additions and 1 deletions

View File

@ -44,6 +44,10 @@ filesystem {
file-id = 0012;
ACL = *=NEVER, CRYPTO=CHV1, UPDATE=AUT1;
}
EF template-extractable-key-1 {
file-id = 7000;
ACL = *=NEVER, READ=$PIN, UPDATE=AUT1;
}
}
DF keydir-2 {
file-id = 4B02;
@ -57,6 +61,10 @@ filesystem {
file-id = 0012;
ACL = *=NEVER, CRYPTO=CHV1, UPDATE=AUT1;
}
EF template-extractable-key-2 {
file-id = 7000;
ACL = *=NEVER, READ=$PIN, UPDATE=AUT1;
}
}
EF template-public-key-1 {
file-id = 5201;

View File

@ -135,6 +135,14 @@ cflex_new_file(struct sc_profile *profile, struct sc_card *card,
desc = "RSA public key";
tag = "public-key";
break;
case SC_PKCS15_TYPE_PUBKEY_DSA:
desc = "DSA public key";
tag = "public-key";
break;
case SC_PKCS15_TYPE_PRKEY:
desc = "extractable private key";
tag = "extractable-key";
break;
case SC_PKCS15_TYPE_CERT:
desc = "certificate";
tag = "certificate";
@ -151,7 +159,7 @@ cflex_new_file(struct sc_profile *profile, struct sc_card *card,
* the generic class (SC_PKCS15_TYPE_CERT)
*/
if (!(type & ~SC_PKCS15_TYPE_CLASS_MASK)) {
profile->cbs->error("File type not supported by card driver");
profile->cbs->error("File type %X not supported by card driver", type);
return SC_ERROR_INVALID_ARGUMENTS;
}
type &= SC_PKCS15_TYPE_CLASS_MASK;