diff --git a/src/pkcs15init/asepcos.profile b/src/pkcs15init/asepcos.profile index 42632e68..6a1727c7 100644 --- a/src/pkcs15init/asepcos.profile +++ b/src/pkcs15init/asepcos.profile @@ -102,7 +102,15 @@ filesystem { UPDATE=$PIN, ERASE=$PIN; } - + # private data objects are stored in transparent EFs. + EF privdata { + file-id = 3402; + structure = transparent; + ACL = *=NEVER, + READ=$PIN, + UPDATE=$PIN, + ERASE=$PIN; + } } } diff --git a/src/pkcs15init/cardos.profile b/src/pkcs15init/cardos.profile index d1a422ac..f6d5d751 100644 --- a/src/pkcs15init/cardos.profile +++ b/src/pkcs15init/cardos.profile @@ -97,6 +97,16 @@ filesystem { ERASE=$PIN; } + # private data objects are stored in transparent EFs. + EF privdata { + file-id = 3403; + structure = transparent; + ACL = *=NEVER, + READ=$PIN, + UPDATE=$PIN, + ERASE=$PIN; + } + } # This is needed when generating a key on-card. diff --git a/src/pkcs15init/cyberflex.profile b/src/pkcs15init/cyberflex.profile index ba5aa6e6..648c9a78 100644 --- a/src/pkcs15init/cyberflex.profile +++ b/src/pkcs15init/cyberflex.profile @@ -111,6 +111,10 @@ filesystem { file-id = 4600; ACL = *=$PIN, READ=NONE; } + EF privdata { + file-id = 4700; + ACL = *=$PIN; + } } } } diff --git a/src/pkcs15init/entersafe.profile b/src/pkcs15init/entersafe.profile index c66d42c1..b8d60736 100644 --- a/src/pkcs15init/entersafe.profile +++ b/src/pkcs15init/entersafe.profile @@ -174,6 +174,13 @@ filesystem { ACL = *=NEVER,READ=NONE,UPDATE=$PIN; } + # private data objects are stored in transparent EFs. + EF data { + file-id = 3401; + structure = transparent; + ACL = *=NEVER,READ=$PIN,UPDATE=$PIN; + } + } } diff --git a/src/pkcs15init/flex.profile b/src/pkcs15init/flex.profile index 319b1b92..0ca65316 100644 --- a/src/pkcs15init/flex.profile +++ b/src/pkcs15init/flex.profile @@ -115,6 +115,10 @@ filesystem { file-id = 4600; ACL = *=$PIN, READ=NONE; } + EF privdata { + file-id = 4700; + ACL = *=$PIN; + } } } } diff --git a/src/pkcs15init/gpk.profile b/src/pkcs15init/gpk.profile index 535796b1..f707d3f3 100644 --- a/src/pkcs15init/gpk.profile +++ b/src/pkcs15init/gpk.profile @@ -72,6 +72,16 @@ filesystem { WRITE=$PIN; } + # private data objects are stored in transparent EFs. + EF privdata { + file-id = 3300; + structure = transparent; + ACL = *=NEVER, + READ=$PIN, + UPDATE=$PIN, + WRITE=$PIN; + } + EF public-key { file-id = 3300; structure = transparent; diff --git a/src/pkcs15init/incrypto34.profile b/src/pkcs15init/incrypto34.profile index c4f05509..13a27c67 100644 --- a/src/pkcs15init/incrypto34.profile +++ b/src/pkcs15init/incrypto34.profile @@ -92,6 +92,16 @@ filesystem { ERASE=$PIN; } + # private data objects are stored in transparent EFs. + EF privdata { + file-id = 3402; + structure = transparent; + ACL = *=NEVER, + READ=$PIN, + UPDATE=$PIN, + ERASE=$PIN; + } + } # This is needed when generating a key on-card. diff --git a/src/pkcs15init/jcop.profile b/src/pkcs15init/jcop.profile index 7fa57c0d..eb2ae952 100644 --- a/src/pkcs15init/jcop.profile +++ b/src/pkcs15init/jcop.profile @@ -41,6 +41,11 @@ filesystem { file-id = 3200; acl = *=NEVER, UPDATE=$PIN, READ=NONE, ERASE=$SOPIN; + } + EF privdata { + file-id = 3500; + acl = *=NEVER, UPDATE=$PIN, READ=$PIN, + ERASE=$SOPIN; } EF public-key { file-id = 3300; diff --git a/src/pkcs15init/muscle.profile b/src/pkcs15init/muscle.profile index b6574682..4e2ca7fb 100644 --- a/src/pkcs15init/muscle.profile +++ b/src/pkcs15init/muscle.profile @@ -162,6 +162,15 @@ filesystem { READ=NONE, UPDATE=$PIN, ERASE=$PIN; + } + # private data objects are stored in transparent EFs. + EF privdata { + file-id = 3400; + structure = transparent; + ACL = *=NEVER, + READ=$PIN, + UPDATE=$PIN, + ERASE=$PIN; } } diff --git a/src/pkcs15init/pkcs15-lib.c b/src/pkcs15init/pkcs15-lib.c index c1260a7b..aa3f4eb3 100644 --- a/src/pkcs15init/pkcs15-lib.c +++ b/src/pkcs15init/pkcs15-lib.c @@ -2339,7 +2339,10 @@ static int select_object_path(sc_pkcs15_card_t *p15card, sc_profile_t *profile, name = "certificate"; break; case SC_PKCS15_TYPE_DATA_OBJECT: - name = "data"; + if (obj->flags & SC_PKCS15_CO_FLAG_PRIVATE) + name = "privdata"; + else + name = "data"; break; default: return 0; diff --git a/src/pkcs15init/starcos.profile b/src/pkcs15init/starcos.profile index ccfa663f..78081746 100644 --- a/src/pkcs15init/starcos.profile +++ b/src/pkcs15init/starcos.profile @@ -122,6 +122,15 @@ filesystem { READ=NONE, UPDATE=$PIN, ERASE=$PIN; + } + # private data objects are stored in transparent EFs. + EF privdata { + file-id = 3401; + structure = transparent; + ACL = *=NEVER, + READ=$PIN, + UPDATE=$PIN, + ERASE=$PIN; } }