Commit Graph

4414 Commits

Author SHA1 Message Date
martin bc5ddb7d95 EstonianEid: add new 2011 card ATR (18.01.2011+)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5112 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-19 08:37:07 +00:00
vtarasov e7790508f6 pkcs15: when setting object data's path, use, if available, the AID from 'DiscretionaryDataObject'
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5111 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-18 16:31:41 +00:00
vtarasov 47f997983e pkcs15: simplify PIN's path assignement
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5110 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-18 16:17:15 +00:00
vtarasov 04f9c46d15 pkcs15-tool: do not print empty path, print path also when it only has 'aid' member
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5109 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-18 16:06:29 +00:00
vtarasov 41c0090321 pkcs15: redesign sc_pkcs15_make_absolute_path() ...
- do nothing if child has 'aid';
- child inherit the parents's 'aid' if this one exists;
- child inherit parents's path of type 'DF NAME' as  'aid';
- return if child path is zero length;

- finaly concatenate parent and child paths.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5108 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-18 16:02:09 +00:00
vtarasov b560561755 pkcs15init: when deleting object ignore the object data file selection error 'FILE_NOT_FOUND' ...
just update the xDF content.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5107 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-18 10:39:08 +00:00
vtarasov 5ab90b9219 libopensc: avoid using of the not completely initialized 'sc_path' variables
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5106 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-18 09:48:26 +00:00
andre 5405d74d19 opensc.conf.in: clean up white spaces
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5105 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-18 04:43:32 +00:00
andre 752af86f2b pkcs15-pin.c: fixes segmentation fault in the case where p15card->app == NULL
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5104 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-17 21:09:48 +00:00
vtarasov 3efe35d246 libopensc: avoid the using of not completely initialized 'sc_path' variables
to be continued...


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5103 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-17 19:00:52 +00:00
vtarasov d1f7e7b8c8 pkcs15init: profile: little fix of the previous commit
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5102 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-17 16:52:04 +00:00
vtarasov 2adfa05ac8 pkcs15init: profile: use short form of the log message call
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5101 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-17 16:49:56 +00:00
vtarasov 4c183b2b38 pkcs15init: function to finalize profile when binding to the application of the multi-application PKCS#15 card.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5100 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-17 16:28:44 +00:00
vtarasov 51ab68db83 pkcs15init: profile: redesign 'sc_profile_find_file_by_path()' ...
to take into account the non-zero 'aid' member in the 'path' parameter 
or in the path of the file's instance

also take into account the non-zero 'aid' when getting 'file-id'


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5099 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-17 16:05:43 +00:00
vtarasov c65bc9023b pkcs15init: profile: new function 'get_parent' ...
to get profile instance of the parent of some file presented by it's profile name.

;accept hexadecimal values presented in 'xAB' form;
;coding style issues;


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5098 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-17 15:51:47 +00:00
vtarasov 1519cb38a1 pkcs15init: profile: handles for 'profile-extention' and 'exclusive-aid' ...
'profile-extention' profile parameter used to load from the separate file 
the AID dependent profile part.

'exclusive-aid' profile parameter used to introduce the AID for the DF
that do not have file-id and that can be selected only by 'DF-NAME' selection.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5097 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-17 15:18:11 +00:00
vtarasov 35a54b511c pkcs15init: profile: sc_profile_finish() accept additional parameter 'application info' ...
Each application of the multi-application PKCS#15 card has it's own associated pkcs15init profile file.
Profile of the multi-application card contains an association between the ID of the on-card application 
and associated profile name.

When sc_profile_finish() is called
 - sc_card is connected,
 - information on the preset on-card applications is available;
 - AID of the applicaition to be binded is known.
thus allowing to sc_profile_finish() to load the final part of the profile.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5096 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-17 14:51:10 +00:00
vtarasov 41731ce56f pkcs15init: profile: parse new AC operation types ...
debug messages and some coding style issues


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5095 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-17 14:03:01 +00:00
vtarasov 2c6d3ee9fa pkcs15: comments and debug messages
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5094 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-17 13:11:21 +00:00
vtarasov 3fdb9f9e71 pkcs15: when getting public key data, return 'direct' object value if available
add debug messages


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5093 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-17 12:54:15 +00:00
vtarasov fd670f2dce pkcs15: initialize 'supported algorithms' in SE data by the ones from tokenInfo
for some cards to prepare security environment for the PSO operation
card driver may need the value of 'algRef' attribut of tokenInfo.supportedAlgorithm.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5092 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-14 17:12:04 +00:00
flc 5e13c7d083 remove unset sc_pkcs15init_finalize_profile function from libopensc.exports
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5091 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-14 09:59:42 +00:00
vtarasov 71bfc87282 asn1: spelling of the debug messages
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5090 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-13 15:06:12 +00:00
vtarasov 2a8fc56402 pkcs15: add array with supported algos references to the key info data type ...
and imlement API to access it


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5089 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-13 14:05:19 +00:00
vtarasov 66412d6e53 asn1: accept long tag ...
According to X.690-0207 ch.8.1.2.4


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5088 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-13 13:59:22 +00:00
vtarasov 7f5ea5b013 libopensc: export sc_find_app(), remove debug message, ...
avoid double '::' separator in path_print();
touch authentic profile file


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5087 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-12 17:41:10 +00:00
vtarasov 4c57c899b3 pkcs15init: add 'aid' argument to prototype of sc_pkcs15init_erase_card() ...
used to indicate application to erase


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5086 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-11 16:50:30 +00:00
vtarasov a798b2dc0c pkcd15init: get PIN reference from SE number when verifying 'SE' secret type ...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5085 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-11 16:40:49 +00:00
vtarasov 76b0a73a80 tools: reserve more place for the print path and AID buffer ...
to insert the '::' indicator of 'AID' or 'DF_NAME' path type


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5084 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-11 10:46:09 +00:00
vtarasov 772ab4cefb libopensc: parse EF.ATR: redefine 'STATUS' macros ...
thanks to Andre Zepezauer for his precious remarks


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5083 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-11 10:29:23 +00:00
vtarasov 56c05c6a6a pkcs15: asn1: extend DDO with 'ddoAID' and 'ddoIIN' ...
This extension is used by multi-applications cards when EF.ODF with EF.tokenInfo 
and xDF with (secure) data objects are placed in a different applications.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5082 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-11 10:19:57 +00:00
vtarasov e98dee0092 pkcs15: asn1: local PIN should have a path defined ...
if there is no 'path' in the 'PinAttributes', use DDO.AID or application path as a PIN's path.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5081 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-11 10:12:42 +00:00
vtarasov a1c3191ba1 libopensc: parse EF.DIR: no need to check the presence of mandatory AID after success of ASN1 decoding
use "struct sc_aid"


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5080 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-11 10:08:05 +00:00
vtarasov 8f5f0b684a libopensc: remove non-ISO7816 members from the EF.ATR data, thanks to Andre Zepezauer
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5079 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-10 14:15:37 +00:00
vtarasov fa9ed3add0 asn1: invalid detection of AID presence in ASN1 path data
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5078 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-10 10:44:52 +00:00
vtarasov 40cb9c99b8 asn1: decode 'extendedPath'
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5077 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-09 17:25:09 +00:00
vtarasov aaa92eeb3d libopensc: adapt 'make_absolute_path' to the path with valid 'aid' member ...
use make_absolute_path() to compose path to 'ODF' and 'tokenInfo'


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5076 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-09 17:23:10 +00:00
vtarasov a808379756 libopensc: when printing 'path', print also the value of 'aid' if available.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5075 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-09 17:17:01 +00:00
vtarasov 0fefb0b078 pkcs15-tool: do not print non-relevant to the 'list-applications' context information
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5074 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-09 17:13:14 +00:00
vtarasov 4ab8018781 iso7816: use already defined local variable 'ctx' instead of 'card->ctx'
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5073 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-09 10:42:40 +00:00
martin 75c1254e22 Initial modifications to support OpenPGP v2.0 (CryptoStick)
* Correct naming: openpgp not opengpg
 * Set the card name from ATR table
 * Add card type enums
 * Currently OpenPGP is read-only.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5072 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-09 10:17:16 +00:00
martin 2d5c76d3d1 iso7816: Don't translate a returned FCP template from SELECT FILE to "unknown data received"
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5071 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-09 10:17:08 +00:00
vtarasov 2b47d90daf libopensc: to be compiled with Visual Studio
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5070 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-09 10:02:43 +00:00
vtarasov 2244d0c96f libopensc: procedure to log the card's cache
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5069 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-09 09:32:34 +00:00
vtarasov 8ee55a38b3 libopensc: extend DDO data type with the parsed 'aid', 'oid' and 'iid' members
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5068 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-09 09:29:39 +00:00
vtarasov b2d885fe34 libopensc: extend serial number to the ISO/IEC 7812 PAN definition
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5067 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-09 09:25:22 +00:00
vtarasov f304fed517 libopensc: add 'crts' array to 'struct sc_acl_entry' ...
For some cards the acl bytes, retrived from 'select' response, can reference 
a SE (and not directly PIN).
In such case, to proceed an authentication for the card operation 
the information about the SE's CRTs is needed.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5066 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-09 09:13:47 +00:00
vtarasov 8f2c96863a libopensc: do not return 'SUCCESS' if EF.ATR do not exist ...
debug messages


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5065 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-09 08:51:55 +00:00
vtarasov 5a7f8a2d60 libopensc: initialize 'sc_path' type variables ...
it's needed to initialize the 'aid' member of 'struct sc_path'


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5064 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-09 08:49:15 +00:00
vtarasov 42fbe85a52 libopensc: use 'calloc' to allocate application info ...
remove unused variable


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5063 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-09 08:31:06 +00:00