ep
1ed93af035
Amend and update register of IC manufacturers for itacns
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5122 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-27 08:43:32 +00:00
martin
2b04b0c328
libopensc: calling sc_context_create without parameters is not allowed
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5120 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-22 12:53:09 +00:00
vtarasov
6ce28a6adb
libopensc: initialize 'sc_ef_atr' type variable
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5114 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-19 14:22:57 +00:00
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
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
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
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
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
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
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
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
vtarasov
ca382fd93b
iso7816: accept 'FCP' tag when processing FCI
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5062 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-09 08:28:38 +00:00
vtarasov
a576582701
libioensc: use 'struct sc_atr' instead of 'u8 *atr, size_t atr_len'
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5061 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-07 17:18:58 +00:00
vtarasov
eb4f283c6a
pkcs15: do not call sc_parse_ef_atr() ...
...
it should be called in the 'init' handle of the card driver
when EF.ATR is present
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5060 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-07 16:09:39 +00:00
vtarasov
bf4aa793af
libopensc: parse content of the EF(ATR) file
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5059 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-07 15:49:10 +00:00
vtarasov
65cd456256
opensc-explorer: print raw content of 'CONTEXT' tag
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5058 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-07 15:47:58 +00:00
vtarasov
cb5b141391
pkcs15: remove unused variables
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5057 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-07 15:44:13 +00:00
vtarasov
82adc9361e
pkcs15: in sc_pkcs15_card include the pointer to the application that the card was binded to
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5056 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-07 13:31:30 +00:00
vtarasov
e600a1e0ac
opensc-explorer: in 'asn1' command print raw content of the ASN1_APPLICATION data
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5055 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-07 09:00:39 +00:00
martin
6af2bc07c3
PC/SC: don't try to use SCARD_SHARE_DIRECT if there is a card in the reader. This can confuse some card/reader combos.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5054 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-07 08:55:12 +00:00
vtarasov
209224816a
libopensc: introduce TLV and LV data type, use it to store DDO data
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5051 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-06 16:16:24 +00:00
vtarasov
0761a61a65
libopensc: use 'struct sc_aid' instead of 'u8 *aid, size_t aid_len'
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5048 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-05 15:42:36 +00:00
vtarasov
0611b6260f
libopensc: add 'sc_aid' member to 'sc_path' ...
...
not all application DF have and can be selected by its file-id.
So, new member in 'sc_path' will help to describe the full path to some EF(DF) inside a card.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5047 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-05 15:39:43 +00:00
vtarasov
121260b846
pkcs15: some changes to the discovery on-card applications code ...
...
; 'known' pkcs#15 applications are moved to the head of the card applications array;
; card specific 'bind finalization' code moved to the dedicated procedures;
; remove unused sc_application member, procedures;
; remove commented code;
; add debug messages;
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5045 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-05 14:53:52 +00:00
vtarasov
f2924672d8
pkcs15: add 'aid' parameter to the prototype of the 'bind' functions ...
...
prepare for the multi-application support
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5041 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-05 14:21:04 +00:00
vtarasov
103af724fe
liopensc: log: use 'normal' as default debug level ...
...
and make shorter short call to insert debug message
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5040 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-04 11:33:03 +00:00
vtarasov
3a2e88ce4d
AuthentIC: remove unused members of the SDO structure
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5039 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-04 10:52:50 +00:00
vtarasov
392e6eff98
AuthentIC: use short form to insert 'normal' debug messages
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5038 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-04 09:19:09 +00:00
vtarasov
cf7c9fd726
libopensc: log: short form to insert 'normal' debug message
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5037 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-04 09:17:37 +00:00
vtarasov
89d47696dd
AuthentIC: remove unused macros, code layout
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5031 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-02 16:26:41 +00:00
martin
f8f38e7d86
Reject creating files bigger than 64K.
...
Most smart cards currently have only 64K or 128K of EEPROM. This will give better errors earlier for people trying to import huge keyfiles with TrueCrypt.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5030 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-02 15:05:42 +00:00
vtarasov
0056eeb34c
AuthentIC: memory allocation errors, thanks to Martin
...
for memory allocation errors use SC_ERROR_OUT_MEMORY instead of SC_ERROR_MEMORY_FAILURE
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5029 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-02 15:01:03 +00:00
vtarasov
898b62bf56
libopensc: more of debug messages, code layout
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5028 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-02 14:32:11 +00:00
vtarasov
971d643a0a
libopensc: encode/decode 'direct' public key value
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5024 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-02 14:25:48 +00:00
vtarasov
d45fb4ca1b
libopensc: set 'enumerated' flag for xDF if corresponding EF file was successfully read ...
...
it's an extention of r4983, that was not properly working for the existing but empty xDF files.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5023 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-02 14:22:38 +00:00
vtarasov
4b5bc9900c
libopensc: asn1: allow empty path
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5022 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-02 14:14:24 +00:00
vtarasov
aec6e175f5
AuthentIC: read/write/update binary card handles can use the 'WAITING-AREA' reader facility ...
...
when used with virtual reader, the APDUs can be buffered in the reader's
internal buffer, before sending it to the distant card.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5021 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-02 14:11:00 +00:00
martin
c911c2ffeb
PC/SC: add additional flags to indicate readers which are in use and readers which are in exclusive mode.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5015 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-02 12:54:51 +00:00
martin
d1d64f9dfe
AktivRutokenECP: make opensc-tool -n show the actual token name, based on ATR
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5014 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-02 12:54:44 +00:00
vtarasov
83453633b7
libopensc: remove '\n' from the debug message ...
...
'sc_do_log_va' takes care of line ending
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5013 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-31 11:09:21 +00:00
vtarasov
6aaf1a79e3
AuthentIC: cleanup dead code
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5012 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-31 10:52:15 +00:00
vtarasov
682c464540
AuthentIC: "now there is no way to build without OpenSSL" (Andre Zepezauer)
...
Thanks for patch.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5011 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-31 08:54:07 +00:00
vtarasov
1a58c429cb
'AuthentIC': basic support of Oberthur's 'COSMO.v7/AuthentIC.v3.2' ...
...
it's the natively PKCS#15 card
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5006 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-30 14:40:28 +00:00
vtarasov
8b270205cc
libopensc: API for the 'erase-binary' card operation
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5005 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-30 13:25:09 +00:00
vtarasov
ee907b7a69
libopensc: add new authentication methods, add ACLs to PIN info, ...
...
add 'next' member to 'sc_apdu' structure
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5004 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-30 13:20:19 +00:00
vtarasov
2804395cf4
libopensc: revert erroneous commit
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5003 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-30 13:10:28 +00:00
vtarasov
92c3e59e16
libopensc: Now 'cache-valid' flag is a member of 'sc_card_cache' ...
...
add 'current_ef' and 'current_df' member to 'sc_card_cache'.
The main purpose of this is to reduce number of APDU transactions.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5002 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-30 13:04:55 +00:00
martin
f694bbf597
libopensc: correctly use HAVE_MALLOC_H to include malloc.h
...
See http://www.freebsd.org/cgi/cvsweb.cgi/ports/security/opensc/files/patch-src_libopensc_card-piv.c#rev1.1
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4999 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-29 10:45:08 +00:00
andre
33a67cac5b
pkcs15.c: Fixes a bug that occurs in the situation where a PKCS15 EF contains partially invalid data. I.e. the last object in the EF is broken and thus can't be decoded successfully. In that case the whole EF becomes never flagged as enumerated. This in turn results in endless processing of that EF. Thereby the first valid objects became attached to the internal obj_list over and over again.
...
That patch prevents the repeated attachment of objects to obj_list, because it marks an EF as enumerated as soon the first object was successfully appended.
Left over from #266 .
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4983 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-22 21:45:43 +00:00
martin
791cbd7f53
Fix r4977: C89 style to support MS Visual Studio
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4979 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-20 08:57:07 +00:00
ep
ab40e70e04
Wrong structure size calculation in pkcs15-itacns.c; thanks to Matteo Nastasi for the heads-up.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4978 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-19 11:18:43 +00:00
ep
c14831eebd
Modified patch for Actalis smart cards. Closes #235 .
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4977 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-19 11:18:40 +00:00
andre
50567141f0
Rename of SC_NO_ERROR to SC_SUCCESS.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4954 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-16 05:04:37 +00:00
andre
f9acbf9073
pkcs15.h: Fixing type of parameter to avoid compiler warning: 'comparison between signed and unsigned'
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4951 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-15 13:47:58 +00:00
andre
8defdf9aed
pkcs15-algo.c: Just making the compiler happy.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4949 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-14 03:11:31 +00:00
andre
3cfe542813
Textual output of SC_ERROR_* return codes in debug messages.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4948 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-14 03:08:17 +00:00
andre
1b030f5d73
pkcs11-pubkey.c: Minor corrections related to r4874 and r4902.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4946 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-14 01:19:46 +00:00
andre
2eca7061b4
iso7816.c: Fixes #301 .
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4945 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-14 01:09:44 +00:00
vtarasov
795dbf0342
win32: change path to the OpenSC registry keys
...
Now it begins with "SOFTWARE\\OpenSC Project\\..." .
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4940 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-12 10:30:07 +00:00
martin
5cc8814e30
EstonianEid: Add SC_ALGORITHM_RSA_RAW to not make sc_pkcs15_compute_signature remove the DigestInfo header.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4939 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-11 22:07:07 +00:00
andre
b1287e3ff2
log.c: Fixes format string to match actual type.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4938 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-09 19:52:56 +00:00
andre
35fd3c10c1
pkcs15.c: Use size_t as type of vector-index.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4937 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-09 19:49:42 +00:00
vtarasov
e259021d36
win32: change path to OpenSC windows registers
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4935 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-09 09:23:21 +00:00
vtarasov
2aa034d467
libopensc: avoid warning 'not all control paths return a value'
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4933 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-09 09:17:08 +00:00
s
d66b3c71d2
fix: implicit depending on the RSA algo_info for GOSTR3410 algo
...
add sc_card_find_gostr3410_alg function
Thanks to Douglas E. Engert
http://www.opensc-project.org/pipermail/opensc-devel/2010-December/015408.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4931 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-09 08:23:14 +00:00
martin
5f1b3a2288
Fix [4911]
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4929 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-08 08:56:12 +00:00
andre
5b69b39c33
sc_pkcs15_pincache_revalidate: Avoid compiler warning 'discards qualifiers from pointer target type'
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4927 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-06 18:59:49 +00:00
andre
ea4ddf8f17
pkcs15-pin: If the usage counter of a cached PIN is expired, then free that cached PIN instead of freeing the objects content that is protected by the PIN.
...
If re-validation of a cached PIN fails, then free that cached PIN to ensure that it isn't used again for re-validation.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4924 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-06 18:33:17 +00:00
andre
3b270b8d27
pkcs15.c: use int instead of bool as type of configuration option pin_cache_counter
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4923 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-06 18:15:12 +00:00
martin
4c2cbeec13
card-piv: remove unused variables.
...
card-piv.c: In function ‘piv_get_data’:
card-piv.c:879: warning: unused variable ‘filename’
card-piv.c:878: warning: unused variable ‘dataenvname’
card-piv.c:877: warning: unused variable ‘keyenvname’
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4917 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-06 14:18:42 +00:00
martin
98d2d6db39
PIV: amend [4908], Apple has /usr/include/malloc/malloc.h
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4916 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-06 14:18:35 +00:00
martin
eb5871645b
entersafe: don't list supported exponents in the dirver.
...
Native keys are generated with exponent 65537, imported keys can now have any (?) exponent.
Tested with openssl genrsa -3/-f4 keys.
Improves r4910 and closes #297
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4915 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-06 12:52:27 +00:00
martin
a92f3a80d5
EstonianEid: limit authentication key usage bits.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4914 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-06 12:52:20 +00:00
martin
9fe86d16fe
libopensc: protect for possible buffer overflows from rogue cards.
...
Reported by Rafael Dominguez Vega
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4913 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-06 12:52:14 +00:00
martin
37944007aa
libopensc: move MIN/MAX macros from muscle.c to internal.h
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4912 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-06 12:52:07 +00:00
martin
cd996245b9
EstonianEid: correctly free the used OpenSSL structures.
...
Thanks to Raul Metsma for the patch.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4911 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-06 12:51:59 +00:00
ludovic.rousseau
5a736c0ac6
entersafe_init(): add support of RSA exponent 35
...
Closes: Ticket #297
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4910 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-06 09:37:23 +00:00
vtarasov
0bf12aa1f4
card-piv: avoid warning 'differs in levels of indirection from' ...
...
when compiling with VS
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4908 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-06 08:30:00 +00:00
dengert
c2fe4609a9
Modifications to support EC and ECDSA for
...
emulated cards. True PKCS#15 cards with EC
will need additional changes.
Main changes are in framework-pkcs15.c, mechanism.c,
padding.c, pkcs15-algo.c and pkcs15-sec.c
where switch statements for key type, and testing
of flags was modified to make it easier to add
additional key types in the future.
The code was tested using RSA and ECDSA using a PIV card
from pkcs11-tool, OpenSSL and Thunderbird with
modifications to NSS-3.12.7 to get ECDSA to sign e-mail.
Only named curves are supported for ECDSA, ECDH is still
needed. pkcs11-tool has only minimal changes need to work
with the -O option to list EC keys.
One additional line was added to pkcs15-sec.c which
should get GOSTR sign to work.
libp11 and engine do not yet have EC support.
--This line, and those below, will be ignored--
M src/tools/piv-tool.c
M src/tools/pkcs11-tool.c
M src/pkcs11/framework-pkcs15.c
M src/pkcs11/mechanism.c
M src/pkcs11/pkcs11-object.c
M src/libopensc/pkcs15-prkey.c
M src/libopensc/card-piv.c
M src/libopensc/padding.c
M src/libopensc/cardctl.h
M src/libopensc/pkcs15-algo.c
M src/libopensc/libopensc.exports
M src/libopensc/pkcs15-piv.c
M src/libopensc/pkcs15-sec.c
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4904 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-01 20:08:42 +00:00
dengert
e2bd16ecd0
Additional EC routines _sc_card_add_ec_alg and sc_card_find_ec_alg
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4903 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-30 19:30:03 +00:00
dengert
c34caeb662
Support for ECC keys (part 1) header files and
...
support routines. Add definitions for EC keys,
parameters and extensions to structures.
Add the sc_card_find_ec_alg, sc_pkcs15_decode_pubkey_ec,
sc_pkcs15_encode_pubkey_ec, sc_pkcs15emu_add_ec_prkey,
sc_pkcs15emu_add_ec_pubkey routines.
Only EC named curves are currently supported.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4902 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-30 19:13:48 +00:00
dengert
137a7282ad
Allow emulation routine to setup an emulated object
...
to be used instead of trying to read a file.
This will be used with the ECC code.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4901 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-30 15:57:01 +00:00
martin
c16179f75a
EstonianEid: Don't leak 1024bit key to 2048b card properties
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4899 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-30 12:33:24 +00:00
martin
7ab591a684
libopensc: make sc_reset() take an additional parameter "do_cold_reset" which will unpower the card.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4896 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-30 11:22:31 +00:00
martin
5d9c02b197
ISO 7816: if decrypting with 2048 keys, non-extended APDU cards require command chaining (Lc would be 257, which is 2 bytes over 255 limit)
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4895 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-29 14:22:15 +00:00
martin
113dfda494
EstEID: add support for v 3.0 cards with 2048b keys
...
* Detect different cards based on ATR-s and on card objects
* Set the card name from the ATR table
* Conditionally add support for 2048b keys
* Add workarounds for broken MULTOS and JavaCard cards.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4893 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-29 14:22:01 +00:00
martin
5c32c15b60
Revert a protocol forcing change from [4873] which was a mistake.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4892 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-29 13:56:27 +00:00
martin
c1c3aa1d55
PC/SC: make (dis)connect actions configurable, SCardDisconnect, SCardEndTransaction and SCardReconnect
...
actions can now be configured via opensc.conf in better detail.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4891 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-29 13:56:19 +00:00
martin
77c8cfc37d
pcsc: a change in ATR will not always mean a changed card, rely on PC/SC layer for card change information.
...
One of the few cards that has two different ATR-s is the EstonianEid card. The changing ATR (especially if
it has different protocol information and historical bytes) can cause confusion in many places, like
Microsoft BaseCSP or certain versions of pcsc-lite.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4890 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-29 13:35:06 +00:00
martin
acb54b965f
typo: remove double semicolon which prevents compilation with Visual Studio.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4888 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-29 08:51:25 +00:00
ludovic.rousseau
c9ad140394
sc_pkcs15emu_postponed_load is no more defined
...
Compilation fails on Mac OS X (but not on GNU/Linux):
Undefined symbols:
"_sc_pkcs15emu_postponed_load", referenced from:
-exported_symbol[s_list] command line option
ld: symbol(s) not found
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4879 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-20 09:30:26 +00:00
andre
821f4fef6d
card.c: Fixes the overriding of max_x_size limitations. In the result, the limitations of cards are adjusted to fit the limitations imposed by the configured reader.
...
ctx.c: Lookup conf_block of reader_driver by short_name
Fixes #269
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4878 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-19 18:09:04 +00:00
andre
5a183a8dc7
framework-pkcs15.c: new logic to discover objects that were hidden before PIN verification
...
pkcs15.c: object search continues with normal processing, even if enumeration of some files failed
pkcs15.h: obsolete prototype removed
pkcs15-syn.c: now obsolete function sc_pkcs15emu_postponed_load removed
fixes : #266
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4877 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-18 23:31:08 +00:00
andre
0ad6771346
{{{more verbose messages for debug in:__sc_pkcs15_search_objectssc_pkcs15_parse_dfsc_pkcs15_read_file}}}
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4876 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-18 18:47:42 +00:00
dengert
d1aa716bec
Move decoding of subjectPubkeyInfo from pkcs15-cert.c
...
to pkcs15-pubkey.c and call the new sc_pkcs15_pubkey_from_spki.
Add sc_pkcs15_pubkey_from_spki_filename to allow a file to
contain the subjectPubkeyInfo, which will be used the the PIV
driver when EC is implemented. The format of the file, is the
same as an X509 certificate subjectPublicKeyInfo and what
OpenSSL calls an EVP_PKEY, which includes the algorithm,
any parameters and the public key.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4874 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-08 17:05:40 +00:00
martin
c6eb9d3d92
PC/SC: move protocol (T=0/T=1) selection to reader-pcsc.c, where it is used.
...
Also, check fot the required protocol before connecting to the card and use the forced prtocol instead of re-connecting.
See http://lists.drizzle.com/pipermail/muscle/2010-November/008671.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4873 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-08 12:37:22 +00:00
ludovic.rousseau
2e9c72ec5e
Use 'const char *' instead of 'char *' for static strings and avoids a
...
lot of "discards qualifiers from pointer target type" warnings
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4870 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-06 18:07:04 +00:00
ludovic.rousseau
96deb9d4d4
Use 'const char *' instead of 'char *' for static strings and avoids a
...
lot of "discards qualifiers from pointer target type" warnings
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4869 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-06 18:05:21 +00:00
ludovic.rousseau
c64cb12f2f
pkcs15-tcos.c: In function ‘insert_pin’:
...
pkcs15-tcos.c:216: warning: declaration of ‘r’ shadows a previous local
pkcs15-tcos.c:194: warning: shadowed declaration is here
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4868 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-06 17:07:13 +00:00
ludovic.rousseau
2a4cdd4d57
pkcs15-pteid.c: In function ‘sc_pkcs15emu_pteid_init’:
...
pkcs15-pteid.c:56: warning: ‘buf’ may be used uninitialized in this function
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4863 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-06 16:58:33 +00:00
ludovic.rousseau
512be83138
ctx.c: In function ‘sc_ctx_detect_readers’:
...
ctx.c:548: warning: ‘r’ may be used uninitialized in this function
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4862 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-06 16:57:05 +00:00
ludovic.rousseau
3ac5bb4ba1
Declare internal functions as static and fix compiler warnings
...
card-itacns.c:90: warning: no previous prototype for ‘itacns_match_cns_card’
card-itacns.c:125: warning: no previous prototype for ‘itacns_match_cie_card’
card-itacns.c:146: warning: no previous prototype for ‘itacns_match_card’
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4861 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-06 16:54:57 +00:00
ludovic.rousseau
3aea304a8e
sc_do_log_va(): fix compiler warning
...
log.c:87: warning: format ‘%03ld’ expects type ‘long int’, but argument
8 has type ‘int’
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4859 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-06 16:50:41 +00:00
martin
df639efd89
EstonianEid: revert to old behavior and have the T=0 forcing.
...
Some cards have incorrect ATR-s and can cause troubles if pcsc-lite by default tries to set T=1 by default.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4834 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-28 13:11:13 +00:00
dengert
bd93b97674
Additianl changes to r4805 which made cert->pubkey a pointer to sc_pkcs15_pubkey_t
...
Thanks to Andre Zepezauer for pointing out most of these.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4828 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-25 20:58:02 +00:00
martin
6648255cb0
EstonianEid: add a broken EstEID ATR to the Micardo driver. Don't force a protocol for EstEID cards
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4825 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-22 15:48:04 +00:00
martin
df2d7d1dd1
EstEID: remove incorrect ATR matching. A reset is required as there is no way simpler way to identify a broken card.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4821 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-20 15:04:31 +00:00
martin
f7000a93c1
EstEID: add workarond for a buggy card.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4819 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-20 08:48:56 +00:00
martin
2d6e3bd262
EstonianEid: remove the iconv dependency and use the common name from the certificate as the card label.
...
This makes it universal, as some cards don't have the personal data file (Digi-ID)
It also makes it a bit ugly, as the common name is the name and personal ID code
concatenated like "FIRSTNAME,LASTNAME,123456789"
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4817 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-19 11:25:25 +00:00
flc
23b64f88d2
fix sc_pkcs15_card_t struct change in cardmod.c and issue in reader_pcsc.c for cardmod part too
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4809 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-15 13:37:37 +00:00
flc
3076fe265c
Fix patch [4709] for cardmod until build in one static dll
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4808 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-15 08:07:34 +00:00
dengert
a569bf9646
Fix test code so will work with card with real history object.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4807 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-14 19:55:57 +00:00
dengert
f194c873d0
Fix 253 third fix for same problem. The first fix
...
r4761 added a test in the wrong place. Second fix
r4804 added the test in the correct place. This fix
removes one of the tests added by r4761
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4806 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-14 14:59:51 +00:00
dengert
0f2a44b33e
sc_pkcs15_pubkey_from_cert now uses parse_x509_cert without OpenSSL.
...
sc_pkcs15_cert now has pointer to sc_pkcs15_pubkey, allowing it to
be removed and used separatly.
sc_pkcs15_pubkey now has pointer to sc_algorithm_id to faclitate
addition of other key algorithms and their parameters.
Various code changes to free these structures and references
to the structures have been changed.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4805 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-12 15:26:45 +00:00
dengert
6b4cb93c84
Fix #253 - Allow caller to read a partial object
...
by returning all that was read. Related to #257
which fixed a different path in apdu.c
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4804 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-08 14:53:29 +00:00
vtarasov
0d96b3c9c3
oberthur: from the common part remove the Oberthur specific tokenInfo flags
...
Thanks to Andre Zepezauer for the patch.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4800 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-07 15:12:12 +00:00
martin
6410da59a9
PC/SC: better detection of card changing events.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4798 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-06 07:54:08 +00:00
martin
19da5d8f16
WindowsInstaller: Fix Mingw32 Windows build
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4793 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-06 07:10:44 +00:00
joao
36f1fbb655
Add new ATR for the Portuguese eID card.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4790 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-05 16:10:35 +00:00
martin
f5a21e417b
pkcs15: don't play with TokenInfo.version. 0 means PKCS#15 v1.1. The flag is not used by OpenSC.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4789 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-05 16:02:57 +00:00
martin
50f99a20f8
libopensc: move TokenInfo fields from sc_pkcs15_card_t to a separate structure.
...
Thanks to Andre Zepezauer for the patch.
See http://www.opensc-project.org/pipermail/opensc-devel/2010-September/015076.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4788 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-05 15:44:58 +00:00
martin
14752f0c43
Remove now unused variables.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4787 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-05 15:12:10 +00:00
martin
192de4199c
libopensc: remove unused SC_CTX_MAGIC define
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4786 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-05 14:58:55 +00:00
martin
c51156875f
libopensc: remove meaningless sc_card_valid()
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4785 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-05 14:58:50 +00:00
martin
75a10198fc
PC/SC: simplify reader state detection.
...
This needs to be improved further, based on revision 5278 of pcsc-lite.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4784 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-05 14:58:45 +00:00
martin
ebdc92407e
PC/SC: move reader feature detection to a separate function. Don't detect features of a reader that is in exclusive mode.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4783 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-05 14:58:29 +00:00
dengert
a71b64f3fc
Fix erros with freeing algorithm parameters and
...
last entry of the algorithm_table.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4780 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-04 15:58:34 +00:00
viktor.tarasov
58c1c88efa
libopensc: homogenise line ending in the debug messages
...
continuating r4759
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4774 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-25 20:35:59 +00:00
viktor.tarasov
10a99dc055
myeid: remove windows line ending
...
because it give the wrong LINE value in the debug messages that follows
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4773 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-25 20:25:23 +00:00
dengert
e9d1f10084
PIV support for NIST 800-73-3 objects,
...
PIV driver client can build and run without OpenSSL,
(admin functions and piv-tool still need OpenSSL)
define PIV specific ctrl codes and structures.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4767 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-24 20:37:22 +00:00
dengert
391ec96306
Remove max_recv_size checks
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4766 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-24 18:34:44 +00:00
dengert
3bb5c9f530
allow pkcs15-itacns.c compile without OpenSSL
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4763 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-22 20:57:07 +00:00
dengert
1a5b898b07
Another max_recv_size fix
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4762 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-22 15:12:01 +00:00
dengert
10a5d1be3a
Fix #257 Reading partial objects differs for T=0 vs T=1
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4761 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-22 14:55:03 +00:00
viktor.tarasov
239de7b6e3
libopensc: remove 'max_xx_size' from debug message
...
after the 'max_xx_size' stuff has been reverted
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4757 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-22 11:51:52 +00:00
martin
4a547b6f09
libopensc: Don't touch TokenInfo.flags->loginRequired
...
See http://www.opensc-project.org/pipermail/opensc-devel/2010-September/014871.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4722 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-15 12:00:16 +00:00
martin
39311cb881
libopensc: check for unset max_recv/send_size in all places.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4721 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-15 11:09:28 +00:00
martin
fc5b3e5417
EstEID: buffer is 2 bytes bigger than max Le.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4720 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-14 09:27:46 +00:00
viktor.tarasov
19df2c812b
MyEID: to be compiled with Visual Studio
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4715 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-13 07:55:12 +00:00
martin
cae16b6ef8
By default the reader driver does not have receive/send limitations.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4714 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-13 07:40:45 +00:00
martin
36705f8f10
Add missing piece from r4706.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4713 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-13 07:27:34 +00:00
martin
89d5bcf4d5
whitespace fix
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4712 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-11 13:01:06 +00:00
martin
0f7891293f
libopensc: fix "ctx.c:389: warning: unused parameter ‘opts’"
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4711 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-11 13:01:00 +00:00
martin
8c1bcea28a
libopensc: remove unused SC_MAX_READER_DRIVERS
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4710 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-11 13:00:54 +00:00
martin
72d961beb2
Fix #216 : initial go with multiple reader subsystem removal.
...
* One sc_context has only a single reader driver.
* remove dynamic reader driver loading capabilities
* remove opensc-tool -R command
* change the internal API, we don't need to pass around a "driver data" pointer as it can be found directly from the context.
* check in ./configure for only a single enabled reader driver
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4709 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-11 13:00:47 +00:00
martin
0858a5c854
libopensc: remove SC_MAX_READERS which is not used.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4708 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-11 13:00:36 +00:00
martin
01c3bde101
Belpic: remove BELPIC_SET_LANG and related code, as it is not used in OpenSC
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4707 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-11 13:00:29 +00:00
martin
a5ca648afd
Revert r4668. Change the way limitations on max send and receive sizes are set.
...
See http://www.opensc-project.org/pipermail/opensc-devel/2010-September/014836.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4706 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-09 18:58:44 +00:00
s
ac0a8dbb15
remove software RSA support for Rutoken S
...
Migration OpenSC to "new scheme" (further to r4646)
http://www.opensc-project.org/pipermail/opensc-devel/2010-September/014717.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4705 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-09 17:28:44 +00:00
ep
ffdad69bca
Avoid mixed declarations and code in ItaCNS files, per C90
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4702 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-08 21:23:49 +00:00
martin
10fe6e4441
MyEID: force PIN padding properties (already set by sc_pkcs15* but not present with opensc-explorer)
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4700 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-07 12:53:26 +00:00
martin
525bf7381e
MyEID: use ISO7816 pin_cmd. Fix card_state logic.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4699 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-07 12:49:16 +00:00
martin
f9026bc86f
EstEID: Fix #250 . Force a SELECT FILE by cheating on the internal micardo path cache.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4697 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-06 09:32:13 +00:00
martin
d994bb81a1
Micardo: remove redundant mcrd_decipher. Handled by ISO7816
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4696 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-06 08:54:13 +00:00
martin
3ab92454a2
card-jcop: remove dummy stubs.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4695 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-05 19:55:00 +00:00
martin
6c156e2318
MyEID: remove no-op ISO7816 wrappers and not implemented stubs.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4694 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-05 19:22:54 +00:00
viktor.tarasov
3d988eed5c
MyEID: make working change/unblock PIN
...
tested with pkcs15-tool on Linux and Windows
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4693 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-05 18:21:43 +00:00
martin
362a907bf0
Micardo: Add SC_PIN_CMD_GET_INFO support, currently only for EstEID cards.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4690 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-05 16:52:56 +00:00
martin
54c67f105b
EstEID: style: use sizeof()
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4689 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-05 16:52:50 +00:00
martin
f085a9b373
libopensc: add SC_PIN_CMD_GET_INFO and related fields to sc_pin_cmd_pin
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4688 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-05 16:52:43 +00:00
viktor.tarasov
ec6bb9859d
MyEID: For Aventra card applied Toni's patch, enriched by Andre's proposal
...
see:
http://www.opensc-project.org/pipermail/opensc-devel/2010-August/014662.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4686 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-04 20:46:07 +00:00
viktor.tarasov
602d170c3d
libopensc: pkcs15: more of debug messages
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4685 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-04 20:21:34 +00:00
viktor.tarasov
741b8c362e
libopensc: supplement to the previous commit
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4684 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-04 20:19:14 +00:00
viktor.tarasov
2db473a160
libopensc: export 'sc_card_find_rsa_alg'
...
Following proposal of Andre Zepezauer, see
http://www.opensc-project.org/pipermail/opensc-devel/2010-August/014699.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4683 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-04 20:16:54 +00:00
viktor.tarasov
0fe106e53a
libopensc: in a supplement to r4668
...
Use 'max_recv_size' when building APDU for 'select file'
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4682 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-04 20:08:52 +00:00
ep
223d5e1bb3
Fix signedness issues in pkcs15-itacns.c
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4681 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-02 22:58:47 +00:00
ep
31e6602835
Remove unused variables and constants from pkcs15-itacns.c
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4680 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-02 22:58:45 +00:00
ep
f70d4acf07
Squelch warning about unused se_num argument in itacns_set_security_env(),
...
as the driver is computing the right argument from the security environment
data.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4679 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-02 22:58:38 +00:00
ep
8697b4c04b
Fix signedness warnings in card-itacns.c
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4678 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-02 22:58:36 +00:00
ep
fbf1d621cb
Remove unused give_random operation
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4677 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-02 22:58:34 +00:00
martin
2d32947de4
Style: // -> /**/
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4673 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-02 13:39:01 +00:00
martin
241d3b5d86
libopensc: improve max_send/recv_size related code comments.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4670 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-01 11:50:39 +00:00
martin
07ab2a2871
Ticket #226 : Initial changes as noted by reporter
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4668 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-01 11:50:24 +00:00
martin
b04a1ef9f0
EstEID: small fixes for working with a modified max_send/recv_size
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4666 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-01 11:46:31 +00:00
martin
befff1b0d4
libopensc: PIN usage counter is decreased every time it is sent to the card, no matter what the card replies (should probably reply with success)
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4665 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-01 06:23:43 +00:00
martin
5e3f7b10d0
Whitespace fix
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4664 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-01 06:23:37 +00:00
martin
12a1e9d49b
pkcs15: don't override TokenInfo PRNG flag. pkcs11: announce CKF_RNG if the card driver supports it, bypassing PKCS#15.
...
GET CHALLENGE and RNG don't match 1:1 anyway.
Thanks to Andre Zepezauer for noticing this.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4661 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-01 06:23:17 +00:00
martin
8d3a1bcd1f
libopensc: remove the "etoken" alias for "cardos" cards.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4659 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-31 01:24:53 +00:00
martin
a7191a9540
Revert CardOS change from Italian CNS patch [4627].
...
Limiting Le for CNS should be done in pkcs15-itacns.c
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4655 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-27 08:24:39 +00:00
s
ed589feda7
add ATR for Rutoken ECP (DS)
...
Thanks to Aktiv Co. Kirill Mescheryakov for the patch.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4654 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-25 19:24:23 +00:00
martin
a3d02dd63c
CT-API, PC/SC: truncating atr_len makes no sense.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4648 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-25 08:32:42 +00:00
martin
1f73d32e40
libopensc: Remove unused internal SC_ERROR_EXTRACTABLE_KEY and correct relevant comments (native != extractable)
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4645 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-23 10:32:26 +00:00
martin
98255b109a
libopensc: Fix SC_ERROR defines and messages: remove unused error defines, fix the internal value of some PKCS#15 related errors.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4644 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-23 10:32:21 +00:00
martin
c235f93cff
EstEID: sc_format_path sets SC_PATH_TYPE_PATH by default
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4642 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-23 09:34:30 +00:00
ep
5990d26f80
If a FCI features tag 84h, then the file is a DF
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4639 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-21 20:12:53 +00:00
ludovic.rousseau
f47416d60e
Do not cast the return value of malloc(3) and calloc(3)
...
From http://en.wikipedia.org/wiki/Malloc#Casting_and_type_safety
" Casting and type safety
malloc returns a void pointer (void *), which indicates that it is a
pointer to a region of unknown data type. One may "cast" (see type
conversion) this pointer to a specific type, as in
int *ptr = (int*)malloc(10 * sizeof (int));
When using C, this is considered bad practice; it is redundant under the
C standard. Moreover, putting in a cast may mask failure to include the
header stdlib.h, in which the prototype for malloc is found. In the
absence of a prototype for malloc, the C compiler will assume that
malloc returns an int, and will issue a warning in a context such as the
above, provided the error is not masked by a cast. On certain
architectures and data models (such as LP64 on 64 bit systems, where
long and pointers are 64 bit and int is 32 bit), this error can actually
result in undefined behavior, as the implicitly declared malloc returns
a 32 bit value whereas the actually defined function returns a 64 bit
value. Depending on calling conventions and memory layout, this may
result in stack smashing.
The returned pointer need not be explicitly cast to a more specific
pointer type, since ANSI C defines an implicit conversion between the
void pointer type and other pointers to objects. An explicit cast of
malloc's return value is sometimes performed because malloc originally
returned a char *, but this cast is unnecessary in standard C
code.[4][5] Omitting the cast, however, creates an incompatibility with
C++, which does require it.
The lack of a specific pointer type returned from malloc is type-unsafe
behaviour: malloc allocates based on byte count but not on type. This
distinguishes it from the C++ new operator that returns a pointer whose
type relies on the operand. (see C Type Safety). "
See also
http://www.opensc-project.org/pipermail/opensc-devel/2010-August/014586.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4636 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-18 15:08:51 +00:00
ep
d37dd91b63
Use strlcpy(3), strlcat(3) in pkcs15-itacns.c
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4635 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-18 13:42:30 +00:00
ep
96df880730
Prevent card-incrypto34.c from catching the Italian CNS card's ATR
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4633 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-18 13:42:21 +00:00
ep
acd062e0dd
Avert potential buffer overflows in pkcs15-itacns.c
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4632 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-18 13:42:16 +00:00
ludovic.rousseau
31d1a552d3
Use (SCARD_READERSTATE *) instead of LPSCARD_READERSTATE since
...
LPSCARD_READERSTATE is not define in old pcsc-lite (< 1.6.3) nor Mac OS X
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4631 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-16 09:33:56 +00:00
martin
bb8b2d5f4b
itacns: add itacns.h to distribution targzip, fix card driver ordering.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4629 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-16 08:59:09 +00:00
martin
484d484c21
PC/SC: Fix building on OS X and mingw32 after r4626
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4628 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-16 08:59:05 +00:00
ep
71cdef0ed2
New card driver: Italian CNS/CIE (eID)
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4627 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-16 00:56:27 +00:00
ludovic.rousseau
947c3291db
Use SCARD_READERSTATE instead of SCARD_READERSTATE_A
...
SCARD_READERSTATE_A is not used by Microsoft API and is no more
defined/used by pcsc-lite >= 1.6.2
Thanks to Josef Windorfer for the bug report
http://www.opensc-project.org/pipermail/opensc-user/2010-August/004235.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4626 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-15 14:57:34 +00:00
martin
9f639f48c4
Add back MAX_ATR_SIZE which was erroneously removed in r4611. Fixes mingw32 build.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4622 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-13 09:27:38 +00:00
ludovic.rousseau
7ac66ae4cf
Correctly use pin2 when needed.
...
Patch from OpenSUSE.
Closes ticket #249 .
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4621 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-12 21:49:14 +00:00
ludovic.rousseau
c7a99c2e03
Use || instead of | in a #if check
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4619 c6295689-39f2-0310-b995-f0e70906c6a9
2010-07-30 07:09:15 +00:00
martin
5c2c12bb78
Trac #244 : Fix structure packing on Apple and SUN. Fix display detection by updating structure definitions.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4611 c6295689-39f2-0310-b995-f0e70906c6a9
2010-07-26 13:16:37 +00:00
viktor.tarasov
006c30c2e0
#245 : pkcs15 asn1: 'subjectName' in 'commonPrivateKeyAttributes' is optional
...
thanks to Jean-Michel
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4518 c6295689-39f2-0310-b995-f0e70906c6a9
2010-07-08 08:09:46 +00:00
viktor.tarasov
3a3c41a6db
pkcs15: encode/decode 'AccessControlRules' in 'CommonObjectAttributes'
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4515 c6295689-39f2-0310-b995-f0e70906c6a9
2010-07-06 09:09:04 +00:00
martin
b7e25bb407
Fix MuscleApplet version detection
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4514 c6295689-39f2-0310-b995-f0e70906c6a9
2010-07-05 17:54:12 +00:00
viktor.tarasov
b78d7630e7
pkcs15: encode/decode 'subjectName' in 'CommonPrivateKeyAttributes'
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4512 c6295689-39f2-0310-b995-f0e70906c6a9
2010-07-05 13:29:10 +00:00
viktor.tarasov
f85b625b47
pkcs15: correct the comments
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4511 c6295689-39f2-0310-b995-f0e70906c6a9
2010-07-05 12:57:10 +00:00
viktor.tarasov
f18ba7d984
pkcs15: decode 'supportedAlgorithms' in 'TokenInfo'
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4510 c6295689-39f2-0310-b995-f0e70906c6a9
2010-07-05 12:54:23 +00:00
viktor.tarasov
1d82e8abab
re-distribute 'define' macros between types.h and opensc.h
...
move 'define' macros closer to the definition of the related data types
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4509 c6295689-39f2-0310-b995-f0e70906c6a9
2010-07-05 09:33:51 +00:00
viktor.tarasov
ae14336221
pkcs15init: create frame to implement card specific 'sanity check' procedure
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4508 c6295689-39f2-0310-b995-f0e70906c6a9
2010-07-02 14:26:29 +00:00
viktor.tarasov
bd5c186767
pkcs15/pkcs11: encoding of certificate's attribute 'serialNumber'
...
Applying patch of Andre Zepezauer. Thanks.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4451 c6295689-39f2-0310-b995-f0e70906c6a9
2010-06-21 10:49:58 +00:00
martin
d61e7b5ba1
OSX: For Tokend, set the debug file by default to /tmp/opensc-debug.log
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4421 c6295689-39f2-0310-b995-f0e70906c6a9
2010-06-16 14:12:27 +00:00
martin
48615686ac
style: // -> /* */
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4416 c6295689-39f2-0310-b995-f0e70906c6a9
2010-06-16 12:01:04 +00:00
martin
0d01cb1cd1
Rename p15emu-westcos.c to pkcs15-westcos.c
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4413 c6295689-39f2-0310-b995-f0e70906c6a9
2010-06-11 07:36:01 +00:00
martin
3cfc64ee6b
style: // -> /* */
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4412 c6295689-39f2-0310-b995-f0e70906c6a9
2010-06-11 07:35:45 +00:00
martin
3d511b8610
MuscleApplet: Check for protocol version to be forward-compatible. Remove some whitespace. Remove support for <1024b keys.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4411 c6295689-39f2-0310-b995-f0e70906c6a9
2010-06-10 14:49:54 +00:00
martin
268e6270d8
MuscleApplet: Don't set the file ID as the name of the file. It is redundant and does not look nice.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4410 c6295689-39f2-0310-b995-f0e70906c6a9
2010-06-10 09:08:00 +00:00
martin
a1c77b96ab
Entersafe: cache the presented PIN on personalization, simplify the code a bit.
...
See http://www.opensc-project.org/pipermail/opensc-devel/2010-June/014312.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4408 c6295689-39f2-0310-b995-f0e70906c6a9
2010-06-09 13:53:11 +00:00
martin
073ad7a4c4
Fix #223 : implement ctbcs_build_modify_verification_apdu.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4396 c6295689-39f2-0310-b995-f0e70906c6a9
2010-06-01 12:28:30 +00:00
martin
6f52711280
CT-API: Fix the mess left from broken [3931] and some pieces from [4118].
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4395 c6295689-39f2-0310-b995-f0e70906c6a9
2010-06-01 12:28:23 +00:00
martin
68f12c881d
Fix a segfault leftover from r4118
...
Thanks to Andre Zepezauer for the report and patch.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4391 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-31 16:49:55 +00:00
s
15d51479ae
fix: SIGSEGV
...
Program received signal SIGSEGV, Segmentation fault.
0x00007f7d6f29fd55 in free () from /lib64/libc.so.6
(gdb) bt
#0 0x00007f7d6f29fd55 in free () from /lib64/libc.so.6
#1 0x00007f7d703a4128 in sc_update_dir (card=0x17463a0, app=<value optimized out>) at dir.c:306
#2 0x00007f7d7040cb58 in sc_pkcs15init_add_app (card=<value optimized out>, profile=0x1754840,
args=<value optimized out>) at pkcs15-lib.c:2354
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4389 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-30 13:52:04 +00:00
viktor.tarasov
fec213ad2e
pkcs11: DER encoded value for CKA_SERIAL_NUMBER
...
discussed in http://www.opensc-project.org/pipermail/opensc-devel/2010-May/014264.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4375 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-25 08:06:28 +00:00
viktor.tarasov
73c516a7a0
pkcs11: resolve 'endless polling' in C_WaitForSlotEvent()
...
http://www.opensc-project.org/pipermail/opensc-devel/2010-April/013947.html
Tested with Firefox 3.6.3 in WinXP SP3 .
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4363 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-19 09:18:38 +00:00
viktor.tarasov
d9b0d643de
libopensc: in sc_pkcs15_verify_pin() if no PIN provided try to use pin pad
...
It's a complement to the r4361.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4362 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-19 08:37:29 +00:00
viktor.tarasov
99c51c6748
libopensc: do not invalidate card cache in sc_unlock()
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4360 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-19 08:18:34 +00:00
martin
98037b795d
MuscleApplet: Detect MuscleApplet specific SW-s; re-organize the source a little.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4350 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-14 13:37:48 +00:00
martin
290d1cb4d6
Muscle: use MuscleApplet as the name of the card as well as driver
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4349 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-14 07:40:02 +00:00
martin
bfa340ba51
MuscleApplet: remove useless card detection flagging, don't call the default driver init operation.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4348 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-14 07:39:58 +00:00
flc
0ad7704247
westcos pkcs15 emulate certificat or public key not both
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4310 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-07 12:49:53 +00:00
flc
9e74991250
Add cardmod pcsc protocol detection
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4288 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-05 09:31:44 +00:00
viktor.tarasov
140f3d0d98
liopensc: fix debug message
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4283 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-03 15:44:27 +00:00
viktor.tarasov
ac41eba3ac
win32: merge the branches/vtarasov/opensc-sm.trunk
...
update win32 compilation;
Unix style line ending in src/pkcs15init/pkcs15-oberthur.h;
variables declaration issue in src/tools/cardos-tool.c.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4280 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-01 12:15:36 +00:00
ludovic.rousseau
b6fb4ff84a
Change in r4269 is not correct since sc_pkcs1_strip_02_padding() returns
...
an int and not a size_t
The new code is also simpler
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4270 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-28 09:16:27 +00:00
jps
71598ad460
r4208 breaks key unwrap.
...
pkcs11-tool -tl gives an error and mail can not be anymore decrypted (tested with Thunderbird).
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4269 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-27 13:25:17 +00:00
jps
aa4d951101
Support for CardOS 4.4
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4264 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-21 14:38:23 +00:00
viktor.tarasov
be3670600b
emulator fix #125 : thanks to Thomas Harning: emulator specific 'clear' handler
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4255 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-18 16:38:49 +00:00
viktor.tarasov
0004461734
oberthur: add in emulator and create in pkcs15init the private data object
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4253 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-18 14:51:44 +00:00
pk
238ebeb159
fixed incorrect IDs of SigG-PINs from 6,7 to 5,6
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4250 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-18 08:24:17 +00:00
viktor.tarasov
d10effd58c
libopensc: fix #209
...
In APDU consider Le=0 as Le=256
Thanks to FrankMpunkt, Martin, ludovic.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4244 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-16 19:34:47 +00:00
viktor.tarasov
ad0207852e
libopensc for win32: get working logging when compiled with Visual Studio
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4242 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-14 11:52:27 +00:00
viktor.tarasov
9396297f21
libopensc for win32: to be compiled
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4241 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-14 11:41:16 +00:00
viktor.tarasov
801fdcefe2
pkcs11, libopensc, pkkcs15init: not use C99 designated initializers
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4238 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-14 11:36:40 +00:00
martin
7ec26d75ae
JCOP/BlueZ: remove unused code
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4236 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-13 11:30:03 +00:00
martin
dac21574bf
card-incrypto34: Remove dead code
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4235 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-13 11:29:59 +00:00
viktor.tarasov
64d05bb6d7
compile for win32: fix
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4221 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-13 09:12:03 +00:00
viktor.tarasov
a31be9540c
libopensc in win32: no more ui.h
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4220 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-12 13:48:54 +00:00
viktor.tarasov
d3068f58d2
libopensc in win32: no more ui.h
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4219 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-12 13:42:11 +00:00
ludovic.rousseau
a3177b727a
Use explict field names in the static initialisation to make it more
...
robust to code change
Fix
card-myeid.c:44: warning: missing initializer
card-myeid.c:44: warning: (near initialization for ‘myeid_drv.atr_map’)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4213 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-02 14:08:22 +00:00
ludovic.rousseau
f8fa636311
Do not use a type of possibly different size.
...
Would fail on PowerPC in 64-bits for example.
Fix
card-entersafe.c: In function ‘entersafe_cipher_apdu’:
card-entersafe.c:197: warning: passing argument 3 of ‘EVP_EncryptUpdate’ from incompatible pointer type
card-entersafe.c: In function ‘entersafe_mac_apdu’:
card-entersafe.c:270: warning: passing argument 3 of ‘EVP_EncryptUpdate’ from incompatible pointer type
card-entersafe.c:278: warning: passing argument 3 of ‘EVP_EncryptUpdate’ from incompatible pointer type
card-entersafe.c:286: warning: passing argument 3 of ‘EVP_EncryptUpdate’ from incompatible pointer type
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4212 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-02 13:57:30 +00:00
ludovic.rousseau
70b649e01b
Use (const char *) for static C-strings
...
Fix
reader-pcsc.c: In function ‘pcsc_detect_readers’:
reader-pcsc.c:856: warning: initialization discards qualifiers from pointer target type
reader-pcsc.c:884: warning: initialization discards qualifiers from pointer target type
reader-pcsc.c:894: warning: initialization discards qualifiers from pointer target type
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4211 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-02 13:51:51 +00:00
ludovic.rousseau
a2ff157eef
Rename variables and parameters
...
Fix
muscle.c: In function ‘msc_create_object’:
muscle.c:144: warning: declaration of ‘read’ shadows a global declaration
/usr/include/unistd.h:477: warning: shadowed declaration is here
muscle.c:144: warning: declaration of ‘write’ shadows a global declaration
/usr/include/unistd.h:513: warning: shadowed declaration is here
muscle.c: In function ‘msc_import_key’:
muscle.c:941: warning: declaration of ‘read’ shadows a global declaration
/usr/include/unistd.h:477: warning: shadowed declaration is here
muscle.c:942: warning: declaration of ‘write’ shadows a global declaration
/usr/include/unistd.h:513: warning: shadowed declaration is here
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4210 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-02 13:49:54 +00:00
ludovic.rousseau
0500ef628b
Do not cast a pointer to a type of possibly different size.
...
Would fail on PowerPC in 64-bits for example.
pkcs15-wrap.c: In function ‘do_cipher’:
pkcs15-wrap.c:152: warning: dereferencing type-punned pointer will break strict-aliasing rules
pkcs15-wrap.c:159: warning: dereferencing type-punned pointer will break strict-aliasing rules
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4209 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-02 13:45:27 +00:00
ludovic.rousseau
e0bf75f69f
Do not cast a pointer to a type of possibly different size.
...
Would fail on PowerPC in 64-bits for example.
pkcs15-sec.c: In function ‘sc_pkcs15_decipher’:
pkcs15-sec.c:136: warning: dereferencing type-punned pointer will break strict-aliasing rules
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4208 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-02 13:33:27 +00:00
ludovic.rousseau
0c77a52f37
Remove 2 ugly casts and fix warnings
...
asn1.c: In function ‘asn1_decode_entry’:
asn1.c:979: warning: dereferencing type-punned pointer will break strict-aliasing rules
asn1.c: In function ‘asn1_encode_entry’:
asn1.c:1263: warning: dereferencing type-punned pointer will break strict-aliasing rules
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4207 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-02 13:12:53 +00:00
ludovic.rousseau
3f30d90045
Use a "const char *" to store a const C-string ptr. Fix a lot (31) of
...
warning: initialization discards qualifiers from pointer target type
Also cast from now (const char *) to (void *) for free()
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4176 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-28 21:02:56 +00:00
ludovic.rousseau
cb5dd59d87
Use a "const char *" to store a const C-string ptr. Fix a lot (162) of
...
warning: initialization discards qualifiers from pointer target type
Also cast from now (const char *) to (void *) for free()
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4175 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-28 21:00:41 +00:00
ludovic.rousseau
425efc939a
Use a "const char *" to store a const C-string ptr. Fix
...
card-piv.c: In function ‘piv_get_data’:
card-piv.c:612: warning: assignment discards qualifiers from pointer target type
card-piv.c:615: warning: assignment discards qualifiers from pointer target type
card-piv.c:618: warning: assignment discards qualifiers from pointer target type
card-piv.c:621: warning: assignment discards qualifiers from pointer target type
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4162 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-28 12:01:14 +00:00
ludovic.rousseau
30b7888c34
Remove unused variables. Fix warning: unused variable
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4157 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-28 11:43:17 +00:00
ludovic.rousseau
385c5da2eb
Fix
...
pkcs15-pubkey.c:445: warning: no previous prototype for ‘sc_pkcs15_decode_pubkey_gostr3410’
pkcs15-pubkey.c:462: warning: no previous prototype for ‘sc_pkcs15_encode_pubkey_gostr3410’
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4149 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-28 09:41:34 +00:00
ludovic.rousseau
815baad156
Fix pkcs15-esinit.c:77: warning: no previous prototype for
...
‘sc_pkcs15emu_entersafe_init_ex’
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4148 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-28 08:41:55 +00:00
ludovic.rousseau
8dd1590662
Fix p15emu-westcos.c:248: warning: no previous prototype for
...
‘sc_pkcs15emu_westcos_init_ex’
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4147 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-28 08:40:10 +00:00
viktor.tarasov
f75f539a6f
libopensc: export 'sc_asn1_encode_object_id'
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4142 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-22 14:14:51 +00:00
viktor.tarasov
0f82c7c1d4
oberthur: pkcs15init emulator
...
Now the native Oberthur card format is supported for emulation of pkcs15 and pkcs15init.
It means that card personalized with OpenSC and the obejcts created with OpenSC
will be usable with the native Oberthur's middleware
and vice-versa.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4137 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-18 12:30:39 +00:00
viktor.tarasov
fb45d8925b
pkcs15init: simplify internal API
...
; do not pad PIN in pkcs15init. It's already done in libopensc/pkcs15-pin;
; the 'do_verify_pin()', 'sc_pkcs15init_verify_key()' and 'do_get_and_verify_secret()' are replaced by unique 'sc_pkcs15init_verify_secret()'; edit debug messages;
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4123 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-17 16:26:07 +00:00
aj
6545b42c02
cleanup of the debug code:
...
* reduce to a few, supported functions.
* change all functions to take the debug level as parameter.
* use symbolic names for the debug levels.
* fix tools to pass "verbose"/"opt_debug" as ctx->debug.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4118 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-15 12:17:13 +00:00
flc
6b1a8423a3
clean libopensc.exports (2 functions removed)
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4115 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-15 07:23:48 +00:00
aj
02768fb5dc
remove "split-key" option and emulat sign for sign,decrypt keys with padding
...
and decrypt() for cardos.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4113 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-13 22:52:51 +00:00
viktor.tarasov
22f067863a
libopensc emu: more general implementation of the postponed DF parsing
...
In previous version the card specific 'parse_df' handler was a part of 'sc_pkcs15_df'.
Now the placehold ('sc_pkcs15_operations') created for the all card emulator specific operations .
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4109 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-13 19:48:09 +00:00
viktor.tarasov
172d710a35
oberthur emu: create pkcs15 object for SOPIN; accept non-initialized token; use 'define' macros for the native file paths
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4108 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-11 13:29:10 +00:00
flc
c3de15d2d0
westcos card small fix
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4105 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-11 06:41:55 +00:00
viktor.tarasov
052881c38f
libopensc: in pkcs15 PIN commands 'pin_info' parameter replaced by 'pin_object'
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4103 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-10 09:23:01 +00:00
martin
91230bdbc9
there is no ui.h any more.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4102 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-10 07:07:13 +00:00
viktor.tarasov
9961fa2487
libopensc: add oberthur pkcs15 emulator to Makefile.mak
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4101 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-09 17:43:09 +00:00
viktor.tarasov
ffab538bcc
oberthur: pkcs15 emulator for the native cards
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4100 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-09 17:40:22 +00:00
viktor.tarasov
0027a21204
libopensc emu: sorry, fix
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4098 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-09 17:11:31 +00:00
viktor.tarasov
3a2f0415fe
libopensc emu: postponed object loading
...
Some non-pkcs15 cards protect the reading of the private objects attributes.
For the emulated pkcs15 cards, the 'init' emu-handler was the only place where pkcs15 objects could be loaded.
This handler is called before the card is binded, and so, for an application there was no 'normal' way to verify PIN and load the objects with protected attributes.
Actually it's possible to complete list of the pkcs15 objects after the emulated pkcs15 card has been binded.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4096 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-09 16:49:00 +00:00
flc
8e8ee649bd
add windows.h include to ctx.c to satisfy dependencies and move internal.h include at end of includes
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4092 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-09 13:39:29 +00:00
flc
995dda778a
internal.h must be before winreg.h include, and change path for include log.h in cardmod.c
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4091 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-09 07:41:28 +00:00
viktor.tarasov
c837196134
libopensc: homogenize name of 'struct sc_pkcs15_card' parameters and variables
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4090 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-08 12:32:35 +00:00
viktor.tarasov
26dc34c83f
libopensc: add structure name to the 'typedef structure' definitions
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4087 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-04 16:19:41 +00:00
aj
d22a2483c0
Header file cleanup.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4081 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-04 08:14:36 +00:00
viktor.tarasov
0bb56af014
pkcs15init: no more need for static keycache
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4079 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-02 17:03:44 +00:00
viktor.tarasov
02c35be138
asepcos: 'trasport PIN' (global PIN with reference '0') is presented as 'AUT' key
...
; no more need of athena dedicated PIN flag 'TRANSPORT KEY';
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4078 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-02 16:22:33 +00:00
viktor.tarasov
de6649fed5
pkcs15init asepcos: fixup initialisation with protected profile
...
; new, athena dedicated, PIN pkcs15 flag 'TRANSPORT_KEY':
in the Athena initialization procedure the 'trasport' SOPIN object is used. This object references to the pre-existing global SOPIN and is different from the final SOPIN of the card. This object should be ignored when fixing up the ACLs of the newly created file;
; the pkcs15 refereces of the new private keys are derived from the file-id;
; remove duplicated code;
; some log messages in pkcs15-lib.c;
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4077 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-02 09:50:07 +00:00
flc
7a48d4a6f2
add support for westcos card with crypto component and minor renames to westcos-tool
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4072 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-25 15:16:23 +00:00
martin
6f887e5b62
#185 : drop opensc-config. If required, pkg-config and libopensc.pc can be used instead.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4070 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-24 12:20:59 +00:00
martin
1ef975fa51
#148 : clear PIN cache in sc_pkcs15_unbind()
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4069 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-24 10:42:36 +00:00
viktor.tarasov
258a867bbc
libopensc: re-design 'sc_pkcs15_allocate_object_content' for the case when the 'new' and 'old' data pointers are the same
...
;change the prototype of 'sc_pkcs15_find_pin_by_type_and_reference' to eliminate the compilation warnings;
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4067 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-24 08:28:15 +00:00
flc
9a11b3019a
set default auth_method SC_AC_CHV for emulated cards thanks to Martin Paljak patch
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4064 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-24 07:48:53 +00:00
viktor.tarasov
975d703c0d
libopensc: remove unused variables
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4063 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-21 20:46:59 +00:00
martin
23b7c2673c
pincache: pkcs15-pin.c:515: warning: unused variable ‘i’
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4061 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-21 19:54:59 +00:00
martin
7b6d2525da
pincache: correct message for user consent PINs (it is a matter of policy not software support)
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4060 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-21 19:53:53 +00:00
martin
a8c4f57c55
Fix exports file:
...
{{{
Undefined symbols:
"_sc_pkcs15init_fixup_acls", referenced from:
-exported_symbols_list command line option
"_sc_pkcs15init_set_pin_data", referenced from:
-exported_symbols_list command line option
"_sc_pkcs15init_set_secret", referenced from:
-exported_symbols_list command line option
}}}
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4059 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-21 19:47:53 +00:00
martin
edcf32337e
libopensc: only one pkgconfig file is required.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4055 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-21 11:02:12 +00:00
viktor.tarasov
9c964e3d71
pincache: implement pincache as the content of the AUTH pkcs15 object
...
; in 'sc_pkcs15_pin_info' structure add 'auth_method' member to keep the PIN authentication method: CHV, AUT or SM;
; in pkcs15init profile add function to search PIN template by auth method and reference;
; in 'sc_pkcs15_remove_object' return silently if object to delete is NULL;
; in 'sc_pkcs15_object' structure add 'usage_counter' member;
; new 'sc_pkcs15_find_pin_by_type_and_reference' procedure to search PIN pkcs15 object by auth method and reference;
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4048 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-20 22:04:07 +00:00
viktor.tarasov
d7dfa2104a
entersafe: fix import key RSA 2048 bits
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4046 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-20 10:09:06 +00:00
martin
30924e4e9d
PKCS15: set the PRNG flag on PKCS#15 card object even if it was not set in TokenFlags if RNG capability is reported by the low level card driver.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4045 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-20 08:34:40 +00:00
martin
26f1750cd7
entersafe: don't mix hexadecimal and decimal in code and comments
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4044 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-20 08:31:19 +00:00
flc
6380feb1fd
Use cardmod if explicitly request on config only
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4041 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-19 10:41:33 +00:00
viktor.tarasov
9c45262f5e
MyEID: fix 'Activate Applet' apdu case
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4040 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-18 17:08:01 +00:00
viktor.tarasov
d89e6377a0
MyEID: 'read until the end' not supported -- set maximal receiving size to 255
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4039 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-18 10:26:08 +00:00
viktor.tarasov
4395d5b8b3
MyEID: fix
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4038 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-18 10:08:32 +00:00
flc
3d23ea782b
cardmod updates:
...
- Add comment to opensc.conf
- Use opensc log in cardmod
- Minor corrections on cardmod pcsc driver
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4036 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-17 07:51:52 +00:00
s
91da9ab819
fix memory leak
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4027 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-12 16:53:07 +00:00
martin
5991dfb433
Remove the dummy EMV driver.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4021 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-11 14:50:18 +00:00
viktor.tarasov
2ab30d8c52
libopensc: 'javacard' driver has to be the last one before 'default' -- thanks to Andreas
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4020 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-11 14:47:34 +00:00
viktor.tarasov
8161c72fa3
libopensc: in
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4019 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-11 14:15:13 +00:00
flc
53d29939fd
remove useless symbol from libopensc.exports
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4013 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-11 08:46:17 +00:00
aj
da83260826
patch from debian bug report 470637 by Philippe Teuwen:
...
update_binary() was not foreseen by the middleware creators of BELPIC
so I added it, which allows to write some data in the
MF/ID/EF(Preferences) of the card.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4010 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-10 07:40:52 +00:00
viktor.tarasov
b8009bec07
libopensc: error message for success
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4009 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-09 15:15:02 +00:00
viktor.tarasov
b28add8e3b
libopensc: in sc_pkcs15_object introduce the 'content' member
...
Replace not-used 'der' structure member by the 'content' one.
'Der' member was introduced to keep the ASN1 encoded object attributes. Actually it's not used.
'Content' is intended to keep the object value (AUTH object - pin cache value; CERT object - der value, ...)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4008 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-09 14:45:07 +00:00
viktor.tarasov
909953d55a
libopensc: separate 'remove' and 'free' pkcs15 object
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4007 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-09 14:05:54 +00:00
viktor.tarasov
935b0740e4
libopensc: remove not used function
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4006 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-09 13:53:27 +00:00
aj
3073306989
Add a comment to keep javacard driver 2nd last.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4005 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-06 12:59:24 +00:00
martin
4d56ce2b7b
Add a catch-all for (possibly) blank JavaCards. This way known blank JavaCards without a supported applet get recognized by opensc-tool -n.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4004 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-06 10:56:29 +00:00
alonbl
f636cc1862
cardmod - build fixups and mingw stuff
...
1. Add --enable-cardmod to autoconf to enable feature explicitly.
2. Modify opensc-cardmod.dll to always have bitness suffix eg opensc-cardmod32.dll
3. Remove complex cardmod.h detection, could not find any reason for this.
4. Make cardmod.inf a template and inject opensc version into its version string.
5. More minor autoconf/automake cleanups.
6. Remove internal-winscard.h usage in cardmod.c as cardmod.h already includes winscard.h
7. DllMain is not exportable.
Notes:
1. I may caused other build not to work, will happy to work it out.
2. Cannot find reason why cardmod.inf cardmod-westcos.reg should reside in bin directory.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4003 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-05 21:39:28 +00:00
flc
0e03c6d5cf
add cardmod a minidrivers for windows
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4001 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-05 13:05:25 +00:00
aj
dc6bc0df4a
fix pthread include for win32/mingw compilation.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4000 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-05 11:21:31 +00:00
aj
f1471e4a0c
Fix bebytes2ushort function, reported by Roland Schwarz.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3999 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-05 06:20:45 +00:00
aj
9406ce2885
Updated piv driver by Douglas E. Engert:
...
the PIV driver no longer need to set the card max_*_size parameters
to get around emulating read_binary and write_binary. It can
now handle partial reads and writes.
The assumptions for write_binary are that the first chuck will
have idx = 0, and the last chunk will write the last byte.
The flags parameter will contain the total length.
The only write_binary operations are done when initializing
a card, and this is only done from piv-tool.c which was modified
to pass in the length and other flags.
Piv-tool continues to be a primative test tool for inializing test
cards. But it has been expanded to be able to write other objects
on test cards.
The serial number of a PIV card is obtained from the CHUID object
if present which has a FASC-N which is an ID number created by the
issuer. Normally PIV cards are issued the U.S. Federal government
But there are ways to use the same cards with a non government CA.
This is then be referred to as PIV Compatible. In this case,
the FASC-N should start with an agency code = 9999 and an RFC 4122
GUID should be present in the CHUID. If this is the case, the GUID
is used as the serial number.
Windows 7 comes with a PIV card card driver, but to get it use one of
these card the CHUID is required. (piv-tool can now write one.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3998 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-05 06:16:37 +00:00
aj
119c7751c7
Improved chaining for large APDU commands,
...
by Mats Andersson and Douglas E. Engert.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3997 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-05 06:14:19 +00:00
aj
91da321c46
remove log output coloring.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3993 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-04 06:22:50 +00:00
aj
b113b90000
remove ui code from library.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3992 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-04 06:19:52 +00:00
martin
314a31f867
[PC/SC / MacOSX] Try to connect to the card twice.
...
On OS X, when you insert a card, securityd sequentially starts all found Tokend-s to see if a card can be handled with one.
If a non-tokend application waits for a card insertion with sc_wait_for_event and tries to connect to the card right after the system sees it, it will fail with "The reader is in use by another application" 95% of the time.
With this hack connecting to the card succeeds 95% of the time with the probable penalty of an extra second on initialization for non-tokend clients.
This should only affect applications that wait for card insertion events.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3991 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-03 15:46:44 +00:00
martin
36992b4001
[PC/SC] detect other events besides card insertion/removal
...
* remove whitespace.
* don't use SC_MAX_READERS and allocate memory dynamically.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3987 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-03 09:54:02 +00:00
alonbl
a6f9f023a0
[WINDOWS] Remove tool specific file description support resource file
...
The implementation was based on the previous MSC build, each tool had its own
description in version resource.
This change sets a single version resource to all files, and produces much
simpler build.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3980 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-02 14:50:42 +00:00
viktor.tarasov
596b8c3c03
oberthur: clean 'global' PIN reference flag when getting byte from ACL
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3979 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-02 14:31:37 +00:00
martin
ff4c2c6aa2
Include simclist.h to opensc includes to be able to build OpenSC.tokend
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3978 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-02 12:53:44 +00:00
martin
92debb4b5e
PC/SC: Do not try to watch 0 readers on OS X
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3977 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-02 12:01:36 +00:00
viktor.tarasov
bf471eaf74
pkcs15init: migrate MyEID to the New API
...
Migrated without testing, but normally should work -- the pkcs15init part of MyEID and SetCOS are sufficiently close.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3976 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-02 09:46:03 +00:00
viktor.tarasov
840053f6ba
pkcs15init: migrate MyEID to the New API
...
Migrated without testing, but normally should work -- the pkcs15init part of MyEID and SetCOS are sufficiently close.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3975 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-02 09:44:46 +00:00
aj
ac9f672189
update windows makefiles: only create one dll.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3973 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-01 15:22:28 +00:00
aj
4b2fe63ac2
build only one shared library instead of many.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3971 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-01 15:12:53 +00:00
viktor.tarasov
5e805ecf2d
libopensc: in iso7816 process_fci() decode Life Cycle Status byte (ISO 7816-4 2005, 5.3.3, tag '8A')
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3961 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-29 10:54:51 +00:00
martin
c23f07764d
Add more event type defines, add declaration of sc_ctx_get_reader_by_id().
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3958 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-28 14:29:30 +00:00
viktor.tarasov
f2d3618ff6
oberthur: finalize migration to the NEW API
...
no more 'init_app'.
- Oberthur unblock style is the only one (local SOPIN is used as PUK);
- user PIN and PUK should be everywhere defined as local;
- SOPIN is always global.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3950 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-27 18:07:14 +00:00
viktor.tarasov
7f0abe80bb
libopensc pkcs15: path is optional for PinAttributes of PinObject
...
- for 'global' PINs path in not encoded into the AODF;
- when selecting pin_reference, start from value defined in profile.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3946 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-27 17:03:04 +00:00
viktor.tarasov
5cd5728c0e
libopensc: search pkcs15 objects: accept NULL value for the output argument
...
So that, the dummy object for the 'search pkcs15 object' calls is not neccessary.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3942 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-26 12:59:08 +00:00
s
2ec8932c93
fix:
...
reader-openct.c: In function 'openct_reader_connect':
reader-openct.c:204: error: 'reder' undeclared (first use in this function)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3941 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-26 10:40:47 +00:00
viktor.tarasov
986309db79
libopensc: new operations for access control
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3939 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-25 16:10:54 +00:00
viktor.tarasov
97d5b3e6e7
sorry, commit by error; reverting back to r3935
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3937 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-25 15:30:33 +00:00
viktor.tarasov
6e9c7e5619
pkcs15-init tool: when importing bunch of certificate, break after the first errorsrc/tools/pkcs15-init.c
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3936 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-25 15:11:35 +00:00
martin
d006b1845e
libopensc:
...
- Remove slot abstraction from internal API and all reader drivers. CT-API (from where it all comes from) readers with multiple slots (if still found) can be presented as separate readers, OpenCT should remove the slot abstraction, PC/SC never knew about it. None of the tools knew how to use slots.
- Add sc_cancel (translates to SCardCancel)
- Re-implement sc_wait_for_event; support a blocking call.
- Replace the "int reader" API with "* sc_reader_t" style; add "Get reader by name" functionality.
- Remove "action" parameter from sc_disconnect_card() (was not used)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3931 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-24 15:25:08 +00:00
martin
0c7d6587be
Use a constant buffer instead of malloc.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3930 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-24 15:14:55 +00:00
martin
cbfa2dd939
Missing piece from r3912
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3928 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-24 12:50:37 +00:00
martin
cd9e666926
SC_ERROR_MEMORY_FAILURE signals EEPROM failures on card. Failures to allocate memory on host result in SC_ERROR_OUT_OF_MEMORY.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3927 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-24 12:38:34 +00:00
martin
612d66655d
Introduce SC_ERROR_NOT_ENOUGH_MEMORY <=> CKR_DEVICE_MEMORY.
...
When trying to import a too large keyfile as a data object, TrueCrypt received a CKR_GENERAL_ERROR before this.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3926 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-23 19:12:52 +00:00
martin
f48ec9528e
OpenSSL 1.0.0-beta series crash when assembler implementations underflow with 0 byte length call to OPENSSL_cleanse() and overwrite memory.
...
Avoid it by nut trying to eraze zero memory.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3925 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-23 06:28:35 +00:00
martin
7d935df1bc
Fix #193 : cryptoflex driver did not set minimum PIN length.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3922 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-21 19:58:49 +00:00
viktor.tarasov
6fc954cbc6
pkcs15init: new profile type BSO
...
at the profile level the difference between EF and BSO is:
- BSO path is always the path of the host DF and do not indexated when template is instanciated;
- EF path is always ending with file-id that is always indexated when template is instanciated.
New non-static 'sc_profile_get_file_instance' procedure to instanciate non-template entries.
In profile.c get_uint() accepts hexadecimals.
In CardOS profile (I venture to) increase the xDF sizes
and change ACL to permit the key re-importing.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3919 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-21 09:41:40 +00:00
martin
d5200b3bbe
Add GemSafeXpresso 32K ATR.
...
The card is available from http://www.smartcardfocus.com/shop/ilp/id~246/p/index.shtml
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3918 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-19 13:11:21 +00:00
martin
29d93a07b1
Add comments about unused errors and add an error for locked readers.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3912 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-15 09:45:11 +00:00
viktor.tarasov
c6a0e54f9a
oberthur: accept token 'OCS ID-One Cosmo Card'; ignore warning status 'end of file reached ...'
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3907 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-13 16:39:37 +00:00
aj
4942760d06
Xiaoshuo Wu:
...
removes the assert line and some unused code, solves a problem with ePass3000.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3906 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-13 12:27:05 +00:00
martin
7ce6c1d05e
PC/SC: Add SCardCancel to please mingw
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3903 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-10 18:44:02 +00:00
aj
f0484968a9
merge changes 0.11.11 -> 0.11.12
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3899 c6295689-39f2-0310-b995-f0e70906c6a9
2009-12-18 13:33:03 +00:00
viktor.tarasov
193ca76980
pkcs15-tool: change PIN with pinpad
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3883 c6295689-39f2-0310-b995-f0e70906c6a9
2009-12-03 12:51:12 +00:00
viktor.tarasov
6ff96b8c66
pinpad support of PIN changing and unlocking
...
Oberthur and opensc-explorer
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3880 c6295689-39f2-0310-b995-f0e70906c6a9
2009-12-03 11:11:04 +00:00
viktor.tarasov
490e02b349
after Martin's suggestion: for pcsc do not use '0' protocol when detecting readers
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3879 c6295689-39f2-0310-b995-f0e70906c6a9
2009-12-03 10:47:51 +00:00
aj
df4bdaf6f7
Update westcos emulation by François Leblanc.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3878 c6295689-39f2-0310-b995-f0e70906c6a9
2009-12-03 07:18:19 +00:00
martin
0756990c44
Patch by João Poupino for Portugese eID card.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3866 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-24 13:43:32 +00:00
s
56dd3ec0ea
Modification Rutoken S binary interfaces by Aktiv Co. (OpenSC+Rutoken S driver for Windows works now)
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3865 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-23 16:38:02 +00:00
viktor.tarasov
505406c3b0
Oberthur: verify PIN with pinpad
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3864 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-23 13:40:05 +00:00
s
b372290e72
correct SEC_ATTR_SIZE name (add prefix)
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3863 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-23 11:41:23 +00:00
s
7cbe5e5470
use generic iso7816_select_file code, remove duplicate code
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3861 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-20 13:15:00 +00:00
s
052775325a
remove dead code (in compliance with http://www.opensc-project.org/opensc/changeset/3839#file8 )
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3860 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-20 12:26:04 +00:00
s
5320ca6fd1
Corrected GOSTR3410 public key structure
...
Working now with GOST R 34.10:
$ pkcs15-init --store-private-key key --key-usage sign,decrypt --auth-id 2 --id 1 --pin "12345678"
$ pkcs15-init --store-certificate my_cert --id 1 --pin "12345678"
But have problem: no CKA_GOSTR3410_PARAMS by retrieve pub_key from certificate, if pub_key object was removed (see parse_x509_cert, asn1_decode_gostr3410_params)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3859 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-19 15:41:03 +00:00
viktor.tarasov
5ba09f087b
logs: time stamp with 1msec resolution in unix. Thanks to Ludovic Rousseau.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3858 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-17 13:27:15 +00:00
viktor.tarasov
4f52e7bba8
reader-pcsc::pcsc_transmit() add log message with the reader's name
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3857 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-17 12:12:17 +00:00
viktor.tarasov
b41fcbedd9
logs: time stamp; dump_hex() with the static output buffer
...
- time stamp in the log messages: for Windows 1msec resolution, otherwise 1sec;
- one more dump hex function, to be easily inserted into the formatted message.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3856 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-17 11:11:05 +00:00
martin
11e9cab070
Fix C coding style to please visual studio. By João Poupino.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3855 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-16 21:41:40 +00:00
martin
1444f8db95
Fix windows build
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3854 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-16 20:45:26 +00:00
martin
e931fdfd06
Fix C coding style
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3853 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-16 20:35:15 +00:00
martin
c5d2618ea3
Estonian eID: fix charset
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3851 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-15 18:08:10 +00:00
martin
c398f55373
Allow to turn off CT-API support
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3850 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-15 18:03:04 +00:00
martin
df20fe72e1
merge [3823:3844/trunk]
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3845 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-13 19:01:21 +00:00
martin
38ba3ad18d
Remove card->finish() functions that do nothing
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3839 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-13 11:32:12 +00:00
martin
bb9423c5f9
Remove unusued variables
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3831 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-13 11:13:35 +00:00
martin
3a3c0b3fe6
Remove unused variables
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3830 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-13 11:13:14 +00:00
martin
a869431ff6
Remove unused variables
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3829 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-13 11:13:01 +00:00
martin
17b7e1b041
Remove unused variables
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3828 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-13 11:12:43 +00:00
martin
1a6f8b7468
Remove unused variables
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3827 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-13 11:12:14 +00:00
martin
684e9b20ba
Convert newlines to unix style, remove compiler warnings.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3826 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-13 11:10:44 +00:00
martin
3ea5bb7987
Merge [3804:3822/trunk]
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3824 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-13 09:45:21 +00:00
martin
36f26b6357
Do not duplicate reader name in private structure.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3812 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-10 10:05:51 +00:00
martin
450e1fc5ae
Merge [3794:3803/trunk]
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3804 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-05 18:27:56 +00:00
martin
30ab50600b
Merged [3783:3794/trunk]
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3795 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-25 20:22:11 +00:00
martin
56fb57603b
Merge [3758:3783/trunk]
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3785 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-22 09:18:16 +00:00
martin
95a5ab0654
Re-implement PIN cache on PKCS#15 layer; remove it from PKCS#11. Re-name and log PKCS#15 options to better reflect the purpose.
...
Data objects and PKCS#15 init are left broken currently.
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3784 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-22 08:59:59 +00:00
martin
4196e9f156
PC/SC: Log enabled options.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3774 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-13 08:29:29 +00:00
martin
615b181471
Revert [3752]
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3773 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-12 09:26:05 +00:00
martin
ea37069272
Merged r3749:3758 from trunk
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3759 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-05 20:10:07 +00:00
martin
91815f380a
PC/SC: better separation between OpenSC and PC/SC types.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3758 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-05 19:59:05 +00:00
martin
64916e01b5
Accidental sc_error removed.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3756 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-03 17:04:32 +00:00
martin
9c7eb8122a
Add support for Portugese eID on IAS and Gemsafe cards, by João Poupino.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3755 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-03 14:41:14 +00:00
martin
a8dc97e0dc
Cardos security env patch for Italian CNI card.
...
By Emanuele Pucciarelli, http://itacns.corp.it/hg/itacns/file/adc0b2ceec86/patches/115-cardos-secenv.patch
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3754 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-03 10:13:45 +00:00
martin
99e84ae82a
Fix spelling
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3753 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-03 10:07:55 +00:00
martin
ab2ed07b78
Fix APDU sanity check.
...
By Emanuele Pucciarelli, http://itacns.corp.it/hg/itacns/file/adc0b2ceec86/patches/010-apdu.patch
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3752 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-03 10:06:53 +00:00
martin
64f9578202
apdu.sensitive is not in use since [2868]
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3751 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-03 09:31:07 +00:00
martin
9da39d8462
Merged r3719:3749 from trunk
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3750 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-03 07:48:28 +00:00
martin
9a95a40e81
Implement pinpad support as used by Portugal eID, by João Poupino
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3744 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-25 19:29:38 +00:00
martin
75cee4ff8e
PC/SC: Fix display detection and clean up
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3738 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-15 12:33:35 +00:00
martin
e350239b37
Fix debug file closing.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3737 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-15 12:29:17 +00:00
martin
46a4b5b70e
EstEID: Fix compiler warnings, add support for PIN retries related PKCS#11 token flags, add a version number for debugging.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3736 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-15 07:59:20 +00:00
martin
b6f9345ea1
Improve EMV and default driver
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3735 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-15 07:51:50 +00:00
martin
0f4092f12d
Fix "log.h:64:4: warning: backslash and newline separated by space"
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3734 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-15 07:50:46 +00:00
martin
6155ae366a
Add back needed debug level check. Thanks to Aleksey Samsonov
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3733 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 12:04:24 +00:00
martin
a614dff522
PKCS#11: Implement more token flags that describe available PIN retries.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3731 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 10:05:40 +00:00
martin
f6d4da7919
PC/SC: Improve core and pinpad code
...
* Make opensc-tool -l display pinpad capabilities, if available
* Detect reader capabilities when a reader is found, not when a connection to a card is opened
* Fix unpadded PIN block parameters to not be rejected by the latest free CCID driver
* When locking the card and it has been reset by some other application (or re-attached), clear cache and lock again
* Enable pinpad detection by default
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3730 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 09:48:56 +00:00
martin
a64cdc1d8e
sc_error removal missing bits
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3729 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 09:35:15 +00:00
martin
7df1c600f1
Remove empty files: emv.c, emv.h
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3728 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 09:15:58 +00:00
martin
1aed8cdec4
PKCS#15-emu: remove dead code
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3727 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 09:08:16 +00:00
martin
cd5aff8ea0
PC/SC: More return codes are handled.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3726 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 09:03:33 +00:00
martin
17593afa60
Fix iconv handle leak
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3723 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 08:53:38 +00:00
martin
d672fde449
Remove sc_error and sc_ctx_suppress_errors_* in favor of sc_debug/fprintf
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3721 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 08:46:59 +00:00
martin
d3201511c7
r3717:3719 from trunk
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3720 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-12 11:46:00 +00:00
aj
16f045bf0c
Douglas E. Engert: major update for the PIV smartcard.
...
The major issue is with getting the length of an object or the cert
contained in an object. The PIV card does not have a directory on the card,
So the previous version tried to put off as long as possible the reading
of objects for performance so as to avoid having to read objects that would
not be used. The first standard, NIST 800-73, set maximum sizes for objects.
800-73-2 removed this for certificates.
A certificate object can contain a certificate which might be compressed.
The only way to get the length of the compressed certificate is to decompress
it. Thus the decompressed certificate could be larger then the container object,
so even if the PIV card had a directory, one would still need to decompress
the certificate to find its length.
OpenSC sc_read_binary will use the length obtained by using
sc_select_file(...,&file_out), and thus the lengths must be determined
in sc_select_file.
Change are to card-piv.c and pkcs15-piv.c and include:
* The old cache code which was not working was removed.
* New cache code was added which caches all object read from the card
* If an object has a cert, the cert is decompressed and also cached.
* As part of reading an object the first 8 bytes are read
and this is then used to allocate a large buffer to read in the
object.
* If pkcs15 or pkcs11 asks about a certificate, the cert object
will be read, and the cert decompressed, to get the actual length.
* If piv_select_file is called with the file_out != NULL the object
will be read to get the length If called with NULL it will not be read.
* The enumeration of the objects now starts with 0.
* sc_ctx_suppress_errors_on and off are used to avoid file not found
messages which are are a by product of not having a directory.
* "Unsigned Card Holder Unique Identifier" object in card-piv and pkcs15-piv.c
had conflicting paths, as NIST 800-72-1 had two tables with different
paths. The enumtag for it in card-piv.c was also wrong.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3710 c6295689-39f2-0310-b995-f0e70906c6a9
2009-07-22 10:09:21 +00:00
aj
d9cd831b4f
Douglas E. Engert: The pkcs15-gemsafeV1.c does not detect of the
...
card present is in fact a gemsafeV1 card, and thus it can end up
issuing commands to the wrong cards.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3709 c6295689-39f2-0310-b995-f0e70906c6a9
2009-07-22 10:06:32 +00:00
jps
8529b7ba3e
Add support for JCOP31 v2.4.1 with the modified muscle applet[1].
...
This add support for 2048bit key and extended APDU.
[1] http://www.opensc-project.org/pipermail/opensc-user/2009-June/003147.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3708 c6295689-39f2-0310-b995-f0e70906c6a9
2009-07-02 13:59:38 +00:00
aj
a3b0d6ae84
Aktiv Co. / Aleksey Samsonov:
...
use generic code instead of identical funciton
(now that the generic code was fixed).
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3706 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-28 07:26:55 +00:00
aj
a2032f5e83
Aktiv Co. / Aleksey Samsonov:
...
use generic set_security_env code, remove duplicate code.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3705 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-28 07:25:47 +00:00
aj
3cf4707b1a
Aktiv Co. / Aleksey Samsonov:
...
Remove dead code.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3704 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-28 07:23:16 +00:00
aj
2a0b63e0ad
Aktiv Co. / Aleksey Samsonov:
...
Add assert() calls to check constant buffer size.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3703 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-28 07:22:24 +00:00
aj
25ab286fed
Aktiv Co. / Aleksey Samsonov:
...
Check buffer length (*outlen)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3702 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-28 07:20:37 +00:00
aj
7d282a9e0e
Aktiv Co. / Aleksey Samsonov:
...
Fix for the case when "apdu.resplen < 2" and checked buffer length.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3701 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-28 07:19:38 +00:00
aj
265eb5923b
Aktiv Co. / Aleksey Samsonov: fix case depending on length.
...
also no need to null resplen or le (done by sc_format_apdu).
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3700 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-28 07:17:19 +00:00
aj
be526c840f
Move emv driver to the end.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3699 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-28 07:11:16 +00:00
ludovic.rousseau
c44b7cbbeb
iso7816_set_security_env(): correctly set P1 parameter in case of
...
SC_SEC_OPERATION_DECIPHER
Thanks to Aleksey Samsonov for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2009-June/012263.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3698 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-25 08:45:05 +00:00
aj
7931ded481
Add new rutoken_ecp driver by Aktiv Co. / Aleksey Samsonov
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3696 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-24 15:26:37 +00:00
ludovic.rousseau
dab3723c95
sc_pkcs15emu_add_object(): fix a memory leak. thanks to cppcheck(1)
...
[pkcs15-gemsafeV1.c:419]: (error) Memory leak: obj
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3693 c6295689-39f2-0310-b995-f0e70906c6a9
2009-05-12 14:29:30 +00:00
ludovic.rousseau
bb900ff9b8
do not cast calloc() return value
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3692 c6295689-39f2-0310-b995-f0e70906c6a9
2009-05-12 14:27:39 +00:00
martin
09a442adb4
Fix SCardDisconnect reset parameter.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3683 c6295689-39f2-0310-b995-f0e70906c6a9
2009-04-17 07:19:03 +00:00
martin
07fce14a6b
Move sc_check_sw to opensc.h
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3682 c6295689-39f2-0310-b995-f0e70906c6a9
2009-04-15 07:52:04 +00:00
martin
86b4d65c4c
Export sc_check_sw, required by external drivers and utilities.
...
Thanks to Marc Rios Vallès.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3681 c6295689-39f2-0310-b995-f0e70906c6a9
2009-04-15 06:18:49 +00:00
martin
6041595895
* Correctly set offsets for PINs for PIN modification operations with pinpads. Thanks to Robert Konklewski.
...
* Only set messages if the reader has display capabilities.
* Detect rejected pinpad commands
* Whitespace fixes
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3679 c6295689-39f2-0310-b995-f0e70906c6a9
2009-04-08 10:31:18 +00:00
alonbl
bfc69348f7
Actually print SCardControl result, thanks to martin
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3677 c6295689-39f2-0310-b995-f0e70906c6a9
2009-04-03 19:54:42 +00:00
alonbl
ef4b1e1410
reader-pcsc - minor cleanups in reader features
...
1. Indent fix.
2. Reorder conditions.
3. Do not print error if SCardControl fails.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3676 c6295689-39f2-0310-b995-f0e70906c6a9
2009-04-03 19:17:15 +00:00
aj
4670238556
Entersafe changes by Weitao Sun:
...
1.Card type FTCOS/PK-01C added. (new)
2.Limit pin length in range [4,16). (bug fix)
3.Can not unblock PIN. (bug fix)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3674 c6295689-39f2-0310-b995-f0e70906c6a9
2009-04-02 10:32:02 +00:00
ludovic.rousseau
117d790aea
Do not use msc_crypt_process (OP_PROCESS). This operation is used to do
...
multipart encryption when, for example, the data is too big to fit in
one APDU. It basically calls the Cipher.update() method until all data
has been processed. However, the Java Card API documentation advises
against using update():
"This method requires temporary storage of intermediate results. In
addition, if the input data length is not block aligned (multiple of
block size) then additional internal storage may be allocated at this
time to store a partial input data block. This may result in additional
resource consumption and/or slow performance. This method should only
be used if all the input data required for the cipher is not available
in one byte array. If all the input data required for the cipher is
located in a single byte array, use of the doFinal() method to process
all of the input data is recommended."
As the card's JVM was returning an internal exception when using
OP_PROCESS, it was decided to implement an msc_crypt_final_object()
function in OpenSC that uses the msc_object_*() functions to read/write
all the data from the card. This way, it is possible to transmit/receive
"arbitrarily" large data chunks to/from the card and use doFinal(). This
is the fallback method when, for example, using 2048 bit keys and the
card doesn't support extended APDUs.
Thanks to Joao Poupino for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2009-March/011978.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3673 c6295689-39f2-0310-b995-f0e70906c6a9
2009-03-25 14:31:21 +00:00
ludovic.rousseau
7f0476ab2a
pcsc_internal_transmit(): do not limit the size of the reception buffer
...
to 258. This check is no more needed now that pcsc-lite can handle
extended APDU.
Thanks to Joao Poupino for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2009-March/011978.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3672 c6295689-39f2-0310-b995-f0e70906c6a9
2009-03-25 14:22:34 +00:00
ludovic.rousseau
04a5c99f77
Detect the eToken 72K and activate RSA 2048 and extended APDU for it.
...
Thanks to Joao Poupino for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2009-March/011978.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3671 c6295689-39f2-0310-b995-f0e70906c6a9
2009-03-25 13:55:25 +00:00
ludovic.rousseau
e0f3545157
Change MSC_MAX_APDU to make some buffers larger to support extended
...
APDUs. The change was only from 256 to 512 bytes since it is more than
enough for 2048 bit keys;
Thanks to Joao Poupino for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2009-March/011978.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3670 c6295689-39f2-0310-b995-f0e70906c6a9
2009-03-25 13:50:41 +00:00
ludovic.rousseau
7b07db6b59
msc_get_challenge(): return SC_SUCCESS instead of dataLength in case of
...
success
Thanks to Joao Poupino for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2009-March/011978.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3669 c6295689-39f2-0310-b995-f0e70906c6a9
2009-03-25 13:47:46 +00:00
ludovic.rousseau
89b2ac778f
msc_get_challenge(): use 0x62 instead of 0x72 for GET CHALLENGE as it is
...
the value used by the Muscle applet (INS_GET_CHALLENGE)
Thanks to João Poupino for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2009-March/011978.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3668 c6295689-39f2-0310-b995-f0e70906c6a9
2009-03-25 13:42:13 +00:00
martin
9862d431e8
Fix typo
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3667 c6295689-39f2-0310-b995-f0e70906c6a9
2009-03-21 11:17:14 +00:00
martin
9668f0aa33
Add support for LCD detection on pinpad devices.
...
* Update IOCTL definitions to PC/SC part 10 v2.02.05
* Return SC_SUCCESS instead of 0 if returning SC_ codes.
* Detect the presence of a display with FEATURE_IFD_PIN_PROPERTIES
Tested with patched CCID driver on OS X, with SPR532 (no display) and OK3821 (with display)
Known CCID reader with a display:
ATMEL_AT91SO.txt: wLcdLayout: 0x0210
CardMan3821.txt: wLcdLayout: 0x0210
Kobil_EMV_CAP.txt: wLcdLayout: 0x0210
Xiring_XI-SIGN.txt: wLcdLayout: 0x020C
Xiring_XI-SIGN_6000.txt: wLcdLayout: 0x020C
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3666 c6295689-39f2-0310-b995-f0e70906c6a9
2009-03-21 11:09:12 +00:00
martin
3b0faecbb1
* Display the default CCID message for PIN verification if the reader has a display
...
* Part 10 -> PC/SC v2
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3665 c6295689-39f2-0310-b995-f0e70906c6a9
2009-03-19 17:54:45 +00:00
martin
464a4f6d74
Fix Global Platform PINs with CCID pinpads.
...
Thanks to François Leblanc for the report:
http://www.opensc-project.org/pipermail/opensc-devel/2009-March/011947.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3664 c6295689-39f2-0310-b995-f0e70906c6a9
2009-03-18 10:18:18 +00:00
alonbl
cd6adb4e26
Fix Windows PINPAD mingw issue
...
Thanks to François Leblanc
http://www.opensc-project.org/pipermail/opensc-devel/2009-March/011932.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3662 c6295689-39f2-0310-b995-f0e70906c6a9
2009-03-07 21:55:40 +00:00
martin
830ba34b67
Fix native windows build, add iconv support
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3643 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-29 11:47:45 +00:00
alonbl
93998e9561
Optionally load SCardControl132 on apple
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3642 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-28 12:43:30 +00:00
martin
aadf4ad037
Fix pinpads on OS X
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3641 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-28 12:28:41 +00:00
alonbl
34a75de5d7
Rutoken updates
...
By Aktiv Co. Aleksey Samsonov
- use PKCS#15 (not builtin PKCS#15 emulator)
- rutoken.profile (add privdata)
- correct using ACL
- correct erase procedure
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3640 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-28 12:10:13 +00:00
alonbl
e1d49190c1
Typo
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3638 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-23 09:27:30 +00:00
alonbl
98841d1e61
Finally remove eval stuff from autoconf
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3636 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-23 09:00:11 +00:00
alonbl
a5f32a99db
Move all private factories into private headers, the iso7816 factory is the only one which is actually exposed
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3634 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-21 13:19:18 +00:00
alonbl
74f6d41dc6
Add sc_get_iso7816_driver as it is required for external drivers
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3633 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-21 13:01:37 +00:00
alonbl
304f227d79
Add SCARD_E_NO_SERVICE to internal-winscard.h
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3632 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-20 08:45:12 +00:00
alonbl
fbd51c705e
Revert 3630
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3631 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-20 08:42:47 +00:00
alonbl
ce5c5f3ae9
Add SCARD_E_NO_SERVICE to internal-winscard.h
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3630 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-19 19:43:19 +00:00
martin
4d5c61d90c
Correct PC/SC -> OpenSC error code translation.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3626 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-19 11:57:20 +00:00
martin
5a7515cd7f
Recognize SCARD_E_NO_SERIVCE:
...
{{{
$ /Library/OpenSC/bin/opensc-tool -a
[opensc-tool] reader-pcsc.c:881:pcsc_detect_readers: SCardEstablishContext failed: 0x8010001d
[opensc-tool] reader-pcsc.c:990:pcsc_detect_readers: returning with: Unknown error
No smart card readers found.
}}}
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3625 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-18 23:16:53 +00:00
alonbl
c9c6f9f2b2
Correct iconv support
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3621 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-16 17:48:26 +00:00
martin
c6f753dc00
Limit virtual OpenCT readers to a sane default of 2 readers/tokens by default.
...
Most users don't use more than one or two tokens concurrently. This way default configuration (or with no configuration file) works even after you insert a PC/SC reader as OpenCT does not "eat up" all PKCS#11 slots with 5 virtual readers.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3618 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-16 16:12:50 +00:00
martin
6ffec42055
Linux compatible PKCS#11-friendly changes to EstEID PKCS#15 emulation driver to display the name of the cardholder in token label field.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3616 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-15 23:20:48 +00:00
martin
315c0edc6e
PC/SC readers have always only one slot per reader.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3615 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-15 21:40:44 +00:00
martin
2e2a998f10
Remove some unused/prehistoric defines.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3614 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-15 21:23:09 +00:00
martin
7e7b94d879
Fix PKCS#15 emulation handling:
...
* Work as expected without a configuration file
* "Normalize" the configuration file: show the used default and give examples with opposite values.
* DWIM:
* If there is no config file: try all builtin drivers
* If there is a configuration file, allow to turn emulation off
* If there is a configuration file, allow to filter the list of internal drivers
* Introduce a PKCS#15 layer card flag for emulated cards
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3613 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-15 21:08:30 +00:00
martin
c64fd881e9
Mac OS X 10.5.6 fixes the ATR padding bug.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3610 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-15 20:01:09 +00:00
alonbl
8828faeccf
Allow delete data objects by specifying application-name and label
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3608 c6295689-39f2-0310-b995-f0e70906c6a9
2008-12-28 21:28:53 +00:00
ludovic.rousseau
6e56f8384a
#include <wintypes.h> on __APPLE__ to define DWORD, LONG, etc. Windows types
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3603 c6295689-39f2-0310-b995-f0e70906c6a9
2008-12-11 09:18:09 +00:00
alonbl
5617c9d535
Fix bug #86 , thanks to ville.skytta
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3601 c6295689-39f2-0310-b995-f0e70906c6a9
2008-12-06 18:49:58 +00:00
martin
1e41d4d267
* Fix issues with pkcs11-tool testing of C_GenerateRandom/C_SeedRandom and OpenSC PKCS#11 implementation of those functions.
...
Thanks goes to Rickard Bondesson who noticed the issues.
http://www.opensc-project.org/pipermail/opensc-devel/2008-November/011436.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3595 c6295689-39f2-0310-b995-f0e70906c6a9
2008-11-24 22:06:27 +00:00
martin
36112bf6e0
typos
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3594 c6295689-39f2-0310-b995-f0e70906c6a9
2008-11-24 21:55:28 +00:00
alonbl
d7941bf850
Re-add pcsc-lite compile-time dependency
...
Win64 changed the SCARDCONTEXT from LONG to ULONG_PTR,
pcsc-lite did not follow this on 64bit platforms.
This breaks the pcsc module.
To solve this we use installed winscard.h in order to get proper
declerations.
As mingw32 does not have winscard.h we keep current types. mingw64 and
pcsc-lite system have winscard.h.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3590 c6295689-39f2-0310-b995-f0e70906c6a9
2008-10-27 19:16:28 +00:00
alonbl
4ad85b3d91
Add some more debug information to pcsc
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3589 c6295689-39f2-0310-b995-f0e70906c6a9
2008-10-26 19:13:14 +00:00
alonbl
d771870d5c
Resolve some conflict with win64
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3588 c6295689-39f2-0310-b995-f0e70906c6a9
2008-10-26 14:48:47 +00:00
ludovic.rousseau
d2f428590b
use 0x%08lx instead of 0x08%lx
...
Thanks to Alon Bar-Lev for the patch
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3587 c6295689-39f2-0310-b995-f0e70906c6a9
2008-10-20 15:04:29 +00:00
ludovic.rousseau
4a1e1192a6
display PC/SC error codes as 0x08%lx instead of %lx to make it explicit
...
they are hex values
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3586 c6295689-39f2-0310-b995-f0e70906c6a9
2008-10-20 07:46:24 +00:00
ludovic.rousseau
b4c5c8d539
use SCARD_S_SUCCESS instead of 0
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3585 c6295689-39f2-0310-b995-f0e70906c6a9
2008-10-20 07:27:41 +00:00
alonbl
ff4d6dd101
Fix for two apparent C code bugs
...
By Stanislav Brabec
entersafe_init_pin_info() was declared as int, but defined and used as
void, resulting in a function returning an unused pseudo-random value.
card-gemsafeV1.c uses comparison 'type == "DF"', which is always false,
as it compares pointer to a string with pointer to the string "DF" in
the code.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3563 c6295689-39f2-0310-b995-f0e70906c6a9
2008-09-10 12:44:40 +00:00
aj
9468d989cf
Douglas E. Engert:
...
The pkcs15-gemsafeV1.c code assumes that the key_ref is always 3. But that is
not always the case. In our case it is 4. The patch tries to determine the
key_ref by looking at what appears to be a table of allocated keys, and picking
the first allocated key.
In case this is not always true, the patch will also allow for the the
opensc.conf card flag = n to specify the key_ref as the low order 4 bits of the
flag.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3557 c6295689-39f2-0310-b995-f0e70906c6a9
2008-08-20 15:17:59 +00:00
aj
27d00f9265
Add new entersafe driver for ePass 3000 tokens.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3556 c6295689-39f2-0310-b995-f0e70906c6a9
2008-08-20 05:41:20 +00:00
aj
07247596d6
Apply security fix.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3552 c6295689-39f2-0310-b995-f0e70906c6a9
2008-07-31 13:25:16 +00:00
aj
e243e7f322
make the sign_with_decrypt hack configureable.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3546 c6295689-39f2-0310-b995-f0e70906c6a9
2008-07-31 12:17:29 +00:00
aj
29d78fde39
move checks to pkcs15_bind, where we can look at the config.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3545 c6295689-39f2-0310-b995-f0e70906c6a9
2008-07-31 12:13:15 +00:00
cg2v
973bf9a791
export a GET DATA operation for cardos so opensc-explorer's do_get works
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3540 c6295689-39f2-0310-b995-f0e70906c6a9
2008-07-27 15:50:01 +00:00
alonbl
4fc6c498ed
Make PC/SC work on Windows again
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3535 c6295689-39f2-0310-b995-f0e70906c6a9
2008-07-02 09:55:32 +00:00
alonbl
7534621a89
Revert pic changeset
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3533 c6295689-39f2-0310-b995-f0e70906c6a9
2008-06-09 08:32:42 +00:00
alonbl
c18dbe5669
More aclocal->m4
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3532 c6295689-39f2-0310-b995-f0e70906c6a9
2008-06-09 08:31:38 +00:00
ludovic.rousseau
96064e195c
add missing prototype for sc_pkcs15emu_rutoken_init_ex()
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3523 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-22 12:30:37 +00:00
ludovic.rousseau
bdaf49b0c8
add missing prototype for sc_pkcs15emu_tcos_init_ex()
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3522 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-22 12:30:16 +00:00
ludovic.rousseau
82314eaa56
do not use system as a variable name. system() is also a function
...
card-akis.c:400: warning: declaration of 'system' shadows a global declaration
/usr/include/stdlib.h:730: warning: shadowed declaration is here
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3521 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-22 12:26:08 +00:00
ludovic.rousseau
99a16c66db
remove two unused variables
...
reader-pcsc.c:739: warning: unused variable 'rv'
reader-pcsc.c:862: warning: unused variable 'again'
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3520 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-22 12:23:25 +00:00
ludovic.rousseau
ca2da1bd67
Avoid variable name space collision
...
reader-pcsc.c:396: warning: declaration of 'priv' shadows a previous local
reader-pcsc.c:367: warning: shadowed declaration is here
reader-pcsc.c:909: warning: declaration of 'reader' shadows a previous local
reader-pcsc.c:901: warning: shadowed declaration is here
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3519 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-22 12:22:23 +00:00
alonbl
e14cf57ad1
Better handle openct reader replug, revert last change in pkcs11-pin
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3512 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-10 09:55:01 +00:00
alonbl
a40cf036bb
Fix sc_pkcs15_verify_pin() to handle OpenCT hotplug correctly
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3511 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-09 22:22:41 +00:00
ludovic.rousseau
91177e51ec
Use size_t instead of int when needed, plus some other minor changes
...
Patch bug.1 included in Ticket #176
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3510 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-05 13:00:01 +00:00
alonbl
96b0f4a670
Verify PIN support Plug&Play
...
If card was reset or reader reconnected, verify can restart
transaction, as upper level will not cache PIN in this case.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3508 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-02 17:56:52 +00:00
alonbl
e237574742
Plug&Play support
...
This is not the best solution, but focus on smallest code change.
Changes:
1. Add detect_readers() to reader opts, this adds new readers to the end
of the readers list until list is full.
2. Add sc_ctx_detect_readers() that calls readers' detect_readers().
3. Fixup pcsc_lock() so that it reconnect to the card and report proper
error so caller may be notified if session was lost.
4. Allow context to be created without readers.
5. Call sc_ctx_detect_readers() from PKCS#11 C_GetSlotList with NULL_PTR.
6. Allow no reader at detect_card, as reader my be removed.
7. Since I broke ABI, I updated the external module version requirement
to match OpenSC version. In the future a separate version should be
maintained for each interface, this should be unrelated to the package
version.
Alon
---
svn merge -r 3480:3505 https://www.opensc-project.org/svn/opensc/branches/alonbl/pnp
M src/tools/opensc-tool.c
M src/pkcs11/pkcs11-global.c
M src/pkcs11/slot.c
M src/libopensc/reader-pcsc.c
M src/libopensc/internal-winscard.h
M src/libopensc/ctx.c
M src/libopensc/reader-ctapi.c
M src/libopensc/libopensc.exports
M src/libopensc/reader-openct.c
M src/libopensc/opensc.h
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3506 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-29 17:01:19 +00:00
alonbl
c862f88ce7
SIGSEGV print_tags_recursive - fix
...
Patch opensc-0.11.4.trunk-r3502-fix-segv_print_tags_asn1.diff (for trunk
trunk revision 3502) is draft.
Example 1 (SIGSEGV):
OpenSC Explorer version 0.11.4-svn
OpenSC [3F00]> cd ff00
OpenSC [3F00/FF00]> asn1 0001
Printing tags for buffer of length 512
[Switching to Thread -1211906368 (LWP 25131)]
By Aktiv Co. Aleksey Samsonov
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3504 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-29 06:11:34 +00:00
alonbl
6c740b907e
More MSVC fixups by Douglas E. Engert
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3503 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-29 06:09:00 +00:00
ludovic.rousseau
e928d5565c
convert C++ in C comment
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3502 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-28 07:57:03 +00:00
ludovic.rousseau
c1311c8c6a
card.c:756: warning: unused variable 'j'
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3496 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-28 07:24:57 +00:00
ludovic.rousseau
ab99cc50bd
convert C++ comment in C comment (ISO C90)
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3495 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-28 07:23:03 +00:00
alonbl
104ff0ed66
rutoken: Some MSVC fixups, by Aktiv Co. Aleksey Samsonov
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3490 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-24 16:34:08 +00:00
alonbl
8d7bce4de2
ruToken fixups
...
http://www.opensc-project.org/pipermail/opensc-devel/2008-April/011057.html
By Aktiv Co. Aleksey Samsonov
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3478 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-18 14:08:23 +00:00
alonbl
5d218007c3
Fix last reference to VERSION and not PACKAGE_VERSION
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3475 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-16 04:32:56 +00:00
alonbl
865f6e9c70
More fixups to maintainer-clean
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3471 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-11 12:52:46 +00:00
alonbl
d84077749b
Distribute autoconf generated files for MSVC build
...
Construct resource files and winconfig.h using autoconf
substitutions.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3468 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-08 18:36:42 +00:00
alonbl
54c1c735f3
Attached are the latest mode to OpenSC svn 3462 to use the Makefile.mak
...
files to build on Windows.
I got rutoken to compile, and took out the #ifdef's I had in last week.
The rutoken programmer declared some variables in the middle of a block
rather then having all the declare statements at the beginning of a block
as is normally done in C. The Microsoft compile treats this as an error.
(Actual many errors.)
The makedef.pl is no longer needed, as the exports files can be used.
Note that in the original Makefile.mak files only opensc.def and
pkcs15init.def were created.
winconfig.h has a number of changes. As discussed last week this could
be created by autoconf. I also noted that the Active State Perl that
was required for the makedef.pl has a psed command that could be used
like sed to update winconfig.h. I did not attempt to do this.
win32/Make.rules.mak - Use ENABLE_OPENSSL and ENABLE_ZLIB
src/tools/Makefile.mak - add the rutoken.tool.exe
src/tools/eidenv.c - use PACKAGE_VERSION
src/pkcs11/Makefile.mak - reorder the objest to match the list in the
Makefile.am. Makes it easier to read.
src/include/winconfig.h - The windows version of the config.h
Changes based on discussions on the list last week.
src/common/Makefile.mak - renamed modules.
src/pkcs15init/Makefile.mak - reordered, and added back the rutoken modules
replaced the use of makdef.pl to sue the exports file.
src/scconf/Makefile.mak - reordered objects.
src/libopensc/card-rutoken.c -
error. Moved the declares to the beginning of blocks.
src/libopensc/Makefile.mak - reorder names, and add rutoken.
Use the libopensc.exports file.
src/libopensc/pkcs15-prkey-rutoken.c - more moving of declare statements.
By Douglas E. Engert
http://www.opensc-project.org/pipermail/opensc-devel/2008-April/011011.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3464 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-07 19:42:43 +00:00
alonbl
66d819a3a6
ruToken C fixups
...
http://www.opensc-project.org/pipermail/opensc-devel/2008-April/011011.html
By Douglas E. Engert
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3463 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-07 19:25:21 +00:00
alonbl
6e65efb257
Some more build cleanups
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3462 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-04 20:38:20 +00:00
alonbl
6f22611438
Fix some duplicate symbols with Windows header files.
...
Thanks to Douglas E. Engert.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3460 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-04 16:46:50 +00:00
alonbl
ac0c291f9c
Fixup WINAPI location
...
By: Douglas E. Engert
(2) Change the typdefs for the SC_*_t routines.
The WINAPI had to be moved. For example from:
typedef PCSC_API LONG (*SCardEstablishContext_t)...
to:
typedef LONG (PCSC_API *SCardEstablishContext_t)...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3458 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-04 06:05:38 +00:00
alonbl
317ad765c5
Solve some Windows conflicts
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3457 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-04 05:39:34 +00:00
alonbl
0e2c664d34
Rename PC/SC library into PC/SC provider.
...
Sync symbols between configuration and source.
Put default provider in opensc.conf, opensc-tool.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3455 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-02 05:44:12 +00:00
alonbl
87db3c96c2
More separate srcdir fixups
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3450 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-01 19:04:33 +00:00
alonbl
39abe22798
More separate srcdir fixups
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3449 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-01 17:08:17 +00:00
ludovic.rousseau
7e30721378
use $(srcdir) when needed to be able to build in separate build
...
directories using: cd foobar ; ../configure srcdir=..
Thanks to Douglas E. Engert for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2008-March/010959.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3445 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-01 12:43:26 +00:00
ludovic.rousseau
9ffe2e159d
use "pkcs15.h" instead of <opensc/pkcs15.h> (and similar)
...
Thanks to Douglas E. Engert for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2008-March/010959.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3444 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-01 12:35:08 +00:00
alonbl
80a16f686d
ruToken cleanups
...
Move constants out of standard files.
Create ruToken specific interface.
Update symbols.
Thread at:
http://www.opensc-project.org/pipermail/opensc-devel/2008-March/010917.html
Cleanup of:
http://www.opensc-project.org/pipermail/opensc-devel/2007-December/010617.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3439 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-26 06:24:37 +00:00
alonbl
a88a543940
Fixup compile under cygwin
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3431 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-19 20:30:36 +00:00
ludovic.rousseau
8436f089c5
pkcs15-gemsafeV1.c:478: warning: 'sc_pkcs15emu_add_pubkey' defined but
...
not used
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3430 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-17 15:17:56 +00:00
ludovic.rousseau
4f53d06c17
change type from int to unsigned int to avoid 2 compiler warnings:
...
pkcs15-gemsafeV1.c:150: warning: comparison between signed and unsigned
pkcs15-gemsafeV1.c:331: warning: comparison between signed and unsigned
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3429 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-17 15:09:16 +00:00
ludovic.rousseau
2800607c4a
rename index -> index_local to avoid a compiler warning
...
pkcs15-gemsafeV1.c:126: warning: declaration of 'index' shadows a global declaration
/usr/include/string.h:304: warning: shadowed declaration is here
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3428 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-17 15:09:16 +00:00
ludovic.rousseau
875d99e46a
use sc_debug/sc_error instead of fprintf(stderr, ...)
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3427 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-17 15:09:16 +00:00
ludovic.rousseau
a05564447a
add ATR for the GemSafeXpresso 16k R3.2
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3426 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-17 15:03:51 +00:00
alonbl
f49f765ac6
Fix libtool versioning issues
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3421 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-15 11:05:26 +00:00
alonbl
8ac87f1b1e
Remove useless comments
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3414 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-09 21:24:24 +00:00
alonbl
440ea331db
Windows DLL suffix is actually delta
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3410 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-09 12:01:22 +00:00
alonbl
0a809dd5cb
Complete rewrite of OpenSC build system.
...
1. Build system now supports MinGW (Windows) compilation using msys and cross compilation.
2. Ability to explicitly disable and enable dependencies of the package.
3. openct, pcsc and nsplugins features are disabled by default.
4. Modified pcsc driver to use pcsc dynamically, no compile time dependency is required.
5. --enable-pcsc-lite configuration option renamed to --enable-pcsc.
6. Install opensc.conf file (as opensc.conf.new if opensc.conf exists).
7. Add--enable-doc configuration option, allow installing documentation into target.
8. Add --disable-man configuration option, allow msys mingw32 users to
build from svn without extra dependencies.
9. Add export files to each library in order to export only required symbols.
Windows native build may use these files instead of scanning objects' symbols.
10. Add opensc-tool --info to display some general information about the build.
11. Create compatibility library to be linked against library instread of recompiling the
same source files in different places.
12. Add different win32 version resource to each class of outputs.
13. Make xsl-stylesheets location selectable.
14. Some win32 fixups.
15. Some warning fixups.
16. Many other autoconf/automake cleanups.
Alon Bar-Lev
svn diff -r 3315:3399 https://www.opensc-project.org/svn/opensc/branches/alonbl/mingw
_M .
D configure.in
_M src
_M src/openssh
M src/openssh/Makefile.am
_M src/tools
M src/tools/rutoken-tool.c
M src/tools/opensc-tool.c
M src/tools/cardos-info.c
M src/tools/pkcs15-crypt.c
M src/tools/pkcs15-init.c
M src/tools/piv-tool.c
M src/tools/netkey-tool.c
M src/tools/eidenv.c
M src/tools/cryptoflex-tool.c
M src/tools/util.c
M src/tools/pkcs11-tool.c
M src/tools/pkcs15-tool.c
M src/tools/util.h
M src/tools/opensc-explorer.c
M src/tools/Makefile.am
_M src/pkcs11
M src/pkcs11/pkcs11-global.c
M src/pkcs11/framework-pkcs15.c
M src/pkcs11/mechanism.c
M src/pkcs11/pkcs11-display.c
M src/pkcs11/pkcs11-object.c
A src/pkcs11/opensc-pkcs11.exports
M src/pkcs11/sc-pkcs11.h
M src/pkcs11/pkcs11-spy.c
M src/pkcs11/openssl.c
M src/pkcs11/Makefile.am
A src/pkcs11/pkcs11-spy.exports
_M src/tests
_M src/tests/regression
M src/tests/regression/Makefile.am
M src/tests/sc-test.c
M src/tests/pintest.c
M src/tests/Makefile.am
_M src/include
_M src/include/opensc
M src/include/opensc/Makefile.am
A src/include/opensc/svnignore
M src/include/Makefile.am
_M src/signer
_M src/signer/npinclude
M src/signer/npinclude/Makefile.am
M src/signer/Makefile.am
A src/signer/signer.exports
_M src/common
A src/common/compat_dummy.c
D src/common/getopt.txt
D src/common/strlcpy.c
D src/common/LICENSE
A src/common/compat_getopt.txt
A src/common/compat_strlcpy.c
A src/common/LICENSE.compat_getopt
A src/common/compat_getopt.c
D src/common/strlcpy.h
D src/common/ChangeLog
D src/common/getpass.c
D src/common/my_getopt.c
A src/common/compat_strlcpy.h
A src/common/compat_getpass.c
A src/common/compat_getopt.h
A src/common/ChangeLog.compat_getopt
D src/common/README.strlcpy
D src/common/my_getopt.h
A src/common/compat_getpass.h
A src/common/README.compat_strlcpy
D src/common/strlcpy.3
A src/common/README.compat_getopt
D src/common/getopt.3
D src/common/README.my_getopt
A src/common/compat_strlcpy.3
A src/common/compat_getopt.3
M src/common/Makefile.am
M src/Makefile.am
_M src/pkcs15init
M src/pkcs15init/pkcs15-oberthur.c
M src/pkcs15init/profile.c
M src/pkcs15init/pkcs15-lib.c
M src/pkcs15init/pkcs15-rutoken.c
A src/pkcs15init/pkcs15init.exports
M src/pkcs15init/pkcs15-gpk.c
M src/pkcs15init/Makefile.am
_M src/scconf
M src/scconf/Makefile.am
M src/scconf/parse.c
A src/scconf/scconf.exports
_M src/libopensc
M src/libopensc/card-rutoken.c
M src/libopensc/compression.c
M src/libopensc/sc.c
M src/libopensc/card-piv.c
M src/libopensc/pkcs15-openpgp.c
M src/libopensc/pkcs15-postecert.c
M src/libopensc/pkcs15-tcos.c
M src/libopensc/opensc-config.in
M src/libopensc/reader-pcsc.c
A src/libopensc/internal-winscard.h
M src/libopensc/ctx.c
A src/libopensc/libopensc.exports
M src/libopensc/pkcs15-piv.c
M src/libopensc/pkcs15-infocamere.c
M src/libopensc/internal.h
M src/libopensc/pkcs15-actalis.c
M src/libopensc/pkcs15-starcert.c
M src/libopensc/card-oberthur.c
M src/libopensc/pkcs15-atrust-acos.c
M src/libopensc/p15card-helper.c
D src/libopensc/part10.h
M src/libopensc/ui.c
M src/libopensc/card-gpk.c
M src/libopensc/pkcs15-wrap.c
M src/libopensc/pkcs15-gemsafeGPK.c
M src/libopensc/log.c
M src/libopensc/pkcs15-esteid.c
M src/libopensc/pkcs15-prkey-rutoken.c
M src/libopensc/log.h
M src/libopensc/Makefile.am
M src/libopensc/reader-openct.c
_M aclocal
M aclocal/Makefile.am
_M win32
M win32/Makefile.am
A win32/versioninfo.rc.in
A win32/ltrc.inc
A configure.ac
_M doc
_M doc/tools
M doc/tools/pkcs15-profile.xml
D doc/changelog.sh
D doc/export-wiki.xsl
_M doc/api
_M doc/api/file
M doc/api/man.xsl
_M doc/api/asn1
_M doc/api/apps
_M doc/api/init
_M doc/api/types
_M doc/api/card
M doc/api/html.xsl
_M doc/api/misc
_M doc/api/util
M doc/Makefile.am
D doc/export-wiki.sh
AM doc/nonpersistent
A doc/nonpersistent/export-wiki.xsl
A doc/nonpersistent/Makefile.am
A doc/nonpersistent/export-wiki.sh
A doc/nonpersistent/svn2cl.xsl
D doc/generate-man.sh
D doc/svn2cl.xsl
M Makefile.am
A svnignore
_M etc
M etc/opensc.conf.in
M etc/Makefile.am
D man
_M solaris
M solaris/Makefile
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3405 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-06 16:06:59 +00:00
ludovic.rousseau
9740726f16
sc_asn1_decode_integer/asn1_encode_integer: correctly manage negative
...
numbers and some positive numbers like 128
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3401 c6295689-39f2-0310-b995-f0e70906c6a9
2008-02-29 15:37:46 +00:00
martin
69742ed3a9
circumvent the 'padded with zeros' ATR bug on Mac OS X <=10.5.2
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3388 c6295689-39f2-0310-b995-f0e70906c6a9
2008-02-14 17:02:02 +00:00
martin
8db7c8c124
* Fix protocol forcing. Whenever connecting, use whatever protocol is available / currently set on card and only force the protocol with a cold reset when different
...
This fixes pcsc_lock->pcsc_reconnect->protocol mismatch error escaping from reader-pcsc.c if some other application has set the card to a different protocol.
* pcsc_reconnect uses PC/SC return values, pcsc_reset uses OpenSC; 0 -> SC_SUCCESS
* CCID driver with OmniKey 1021 returns SCARD_W_UNPOWERED_CARD when a card is inserted upside-down. Translate the currently unknown error into 'Unresponsive card'.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3386 c6295689-39f2-0310-b995-f0e70906c6a9
2008-02-10 16:13:55 +00:00
ludovic.rousseau
a4bad4452e
Add support for the Austrian A-Trust ACOS card
...
Thanks to Franz Brandl for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2008-February/010675.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3318 c6295689-39f2-0310-b995-f0e70906c6a9
2008-02-01 14:31:02 +00:00
ludovic.rousseau
156f368f9d
add two missing files for ruToken support
...
Thanks to Ian Young for the bug report
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3312 c6295689-39f2-0310-b995-f0e70906c6a9
2008-01-04 08:57:12 +00:00
ludovic.rousseau
bf9d6beaac
new patch for ruToken support
...
Thanks to Andrew V. Stepanov
http://www.opensc-project.org/pipermail/opensc-devel/2007-December/010631.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3310 c6295689-39f2-0310-b995-f0e70906c6a9
2008-01-03 08:59:14 +00:00
pk
513a3dde0a
support for TCOS3
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3309 c6295689-39f2-0310-b995-f0e70906c6a9
2007-12-28 18:18:57 +00:00
martin
1667798217
Remove unused code.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3308 c6295689-39f2-0310-b995-f0e70906c6a9
2007-12-21 16:40:27 +00:00
jps
27257f2278
support for Siemens CardOS V4.2C
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3306 c6295689-39f2-0310-b995-f0e70906c6a9
2007-12-19 09:58:29 +00:00
ludovic.rousseau
0ecc294ed8
add support of ruToken
...
Thanks to Andrew V. Stepanov for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2007-December/010617.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3304 c6295689-39f2-0310-b995-f0e70906c6a9
2007-12-17 13:39:20 +00:00
ludovic.rousseau
4d098d9650
do not add a signature prefix for D-Trust cards
...
Thanks to Simon Eisenmann for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2007-December/010609.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3303 c6295689-39f2-0310-b995-f0e70906c6a9
2007-12-07 09:46:21 +00:00
ludovic.rousseau
d2bec293d2
gemsafe_init(): the applet supports also SC_ALGORITHM_RSA_HASH_NONE
...
thanks to Douglas E. Engert for the patch
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3302 c6295689-39f2-0310-b995-f0e70906c6a9
2007-11-15 15:52:46 +00:00
ludovic.rousseau
44b2d51385
gemsafe_flags2algref(): return 0x12 instead of 0x13 for
...
SC_ALGORITHM_RSA_PAD_PKCS1
thanks to Douglas E. Engert for the patch
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3301 c6295689-39f2-0310-b995-f0e70906c6a9
2007-11-15 14:07:13 +00:00
ludovic.rousseau
82253cd635
sc_pkcs15emu_gemsafeV1_init(): remove addition of
...
SC_ALGORITHM_RSA_PAD_PKCS1 algorithm since it is already done in
card-gemsafeV1.c:gemsafe_init()
Thanks to Douglas E. Engert for the patch
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3299 c6295689-39f2-0310-b995-f0e70906c6a9
2007-11-13 09:13:17 +00:00
ludovic.rousseau
83cef7bfc0
remove spaces and tabs at end of lines
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3298 c6295689-39f2-0310-b995-f0e70906c6a9
2007-11-13 07:52:43 +00:00
ludovic.rousseau
acda677fd0
sc_pkcs15emu_add_pin(): do not devide pin length by 2 in BCD case since
...
it is already done in sec.c line 262
Thanks to Douglas E. Engert for the patch
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3297 c6295689-39f2-0310-b995-f0e70906c6a9
2007-11-13 07:48:08 +00:00
ludovic.rousseau
07e6b23a26
add initial support of Gemsafe applet V1 cards
...
Thanks to David Mattes for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2007-November/010558.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3296 c6295689-39f2-0310-b995-f0e70906c6a9
2007-11-12 10:18:54 +00:00
ludovic.rousseau
1eb6fba882
rename sc_pkcs15emu_gemsafe_init_ex() in
...
sc_pkcs15emu_gemsafeGPK_init_ex() and sc_pkcs15emu_gemsafe_init() in
sc_pkcs15emu_gemsafeGPK_init()
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3295 c6295689-39f2-0310-b995-f0e70906c6a9
2007-11-12 10:16:31 +00:00
ludovic.rousseau
f3a3fd6081
rename pkcs15-gemsafe.c in pkcs15-gemsafeGPK.c
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3294 c6295689-39f2-0310-b995-f0e70906c6a9
2007-11-12 10:09:57 +00:00
ludovic.rousseau
88ee3980e3
rename gemsafe in gemsafeGPK so we can also have gemsafeV1, gemsafeV2,
...
etc.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3293 c6295689-39f2-0310-b995-f0e70906c6a9
2007-11-12 09:59:57 +00:00
ludovic.rousseau
ca92ec661f
patch from Douglas E. Engert for bug #165
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3292 c6295689-39f2-0310-b995-f0e70906c6a9
2007-11-09 08:35:23 +00:00
ludovic.rousseau
caf4207090
setcos_match_card(): replace sc_error() by sc_debug() since some cards
...
are not SetCOS bug respond to the APDU: 00 CA DF 30 05
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3291 c6295689-39f2-0310-b995-f0e70906c6a9
2007-11-09 08:29:15 +00:00
gurer
f947614418
This should be limited too.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3278 c6295689-39f2-0310-b995-f0e70906c6a9
2007-10-06 12:03:47 +00:00
nils
57f7f6e6e5
ignore paths with a AID in it
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3277 c6295689-39f2-0310-b995-f0e70906c6a9
2007-09-29 07:43:25 +00:00
gurer
4dd4d52921
AKIS can handle bigger data blocks, but that causes GET_RESPONSE calls.
...
So for a 300 byte file, this saves one transaction (244 + 56) instead of
(244 + 11 + 45).
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3273 c6295689-39f2-0310-b995-f0e70906c6a9
2007-09-23 10:19:43 +00:00
gurer
780b4afe8a
On a third thought, it is better to not introduce any confusion at all :)
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3272 c6295689-39f2-0310-b995-f0e70906c6a9
2007-09-22 20:47:04 +00:00
gurer
eada3a7e1c
On a second thought, it is better to stay compatible with released
...
0.11.4 code, and still use ISO7814 pin_cmd.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3271 c6295689-39f2-0310-b995-f0e70906c6a9
2007-09-22 20:34:53 +00:00
gurer
3b47022051
* instead of using a custom PIN VERIFY command, pin_reference is
...
reported back, and used for verifying.
* PIN CHANGE command is implemented (that is really different
from ISO7816)
* max_pin_len is set to 16 in akis_init
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3270 c6295689-39f2-0310-b995-f0e70906c6a9
2007-09-17 11:41:28 +00:00
aj
af9199b059
Appy patch by magog to build a static opensc_a.lib on windows.
...
Also removes *.lib on "make clean".
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3265 c6295689-39f2-0310-b995-f0e70906c6a9
2007-09-10 06:22:36 +00:00
aj
6882b13287
fix typo found by Gürer Özen.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3264 c6295689-39f2-0310-b995-f0e70906c6a9
2007-09-04 05:39:15 +00:00
nils
4d1871d74c
properly check return value
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3263 c6295689-39f2-0310-b995-f0e70906c6a9
2007-08-29 19:54:10 +00:00
nils
c2ee37e6c7
bugfix: select DF before setting sec. attributes
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3262 c6295689-39f2-0310-b995-f0e70906c6a9
2007-08-29 19:32:23 +00:00
aj
c25e4f765c
akis update by Gürer Özen: implement logout code.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3261 c6295689-39f2-0310-b995-f0e70906c6a9
2007-08-28 20:35:27 +00:00
aj
43b7391a94
fix typo, found by Gürer Özen.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3260 c6295689-39f2-0310-b995-f0e70906c6a9
2007-08-28 20:35:06 +00:00
aj
11ec3adace
mark supported padding and a comment - by Gürer Özen
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3258 c6295689-39f2-0310-b995-f0e70906c6a9
2007-08-22 18:38:37 +00:00
aj
f9b30e48c4
fix typos, patch by Gürer Özen
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3257 c6295689-39f2-0310-b995-f0e70906c6a9
2007-08-22 18:38:02 +00:00
aj
832e325ff7
fix typo.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3248 c6295689-39f2-0310-b995-f0e70906c6a9
2007-08-14 06:17:34 +00:00
aj
9a10cdeebd
add cflags for ltdl.h where needed.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3245 c6295689-39f2-0310-b995-f0e70906c6a9
2007-08-13 19:10:26 +00:00
ludovic.rousseau
345ce22c63
use LTLIB_CFLAGS and LTLIB_LIBS instead of the global LIBS to find and use
...
libltdl
thanks to Alon Bar-Lev for the patch
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3243 c6295689-39f2-0310-b995-f0e70906c6a9
2007-08-13 08:30:19 +00:00
aj
a7912a2426
add information about cardos 4.2b - latest cardos update.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3237 c6295689-39f2-0310-b995-f0e70906c6a9
2007-08-08 20:06:53 +00:00
aj
f7636ab5db
Add same hack for Prime cards.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3236 c6295689-39f2-0310-b995-f0e70906c6a9
2007-08-03 07:47:13 +00:00
aj
e1002b91eb
fix a compiler warning.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3231 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-24 06:42:12 +00:00
aj
25e85b4cc9
Gürer Özen:
...
* akis_get_data() implemented
* akis_delete_file() implemented
* akis_set_security_env() implemented, pkcs15 signing works now
* life cycle set/get via cardctl implemented
* card_ops commented, so it is clear whether a function is supported via
iso7816 implementation or not
* mark pin apdu as sensitive in akis_pin_cmd
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3230 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-22 19:56:03 +00:00
aj
c1130f7f93
oops, define tmplen at start of block.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3227 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-20 14:38:46 +00:00
aj
a577a25813
silence a warning we get with siemens cards.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3226 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-20 13:47:17 +00:00
aj
d59917cd21
asn1_decode_entry() allocates (objlen - 1) bytes for SC_ASN1_UTF8STRING
...
types with SC_ASN1_ALLOC flag, then calls the sc_asn1_decode_utf8string()
function which then fails with BUFFER TOO SMALL cause it wants to end the
string with an extra NULL.
allocation size was supposed to be objlen + 1.
Patch by Gürer Özen
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3225 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-20 12:30:59 +00:00
aj
b757ff1719
Gürer Özen send another akis update:
...
* create_file implemented
* EF(DIR) hack removed, it is easier to put a real EF(DIR)
* SC_CARDCTL_GET_SERIALNR implemented
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3224 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-20 12:28:43 +00:00
aj
14bc32dda2
Sign by using the decrypt function.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3223 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-20 12:19:27 +00:00
aj
60e3e1e683
add akis support by Gürer Özen.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3222 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-17 20:01:55 +00:00
aj
fc20adecbc
Douglas E. Engert:
...
The IdAlly CSP calls C_FindObjectsInit looking for CK_PRIVATE_KEY before
C_Login with a pin. If it does not find any, it fails. The pkcs15-piv.c in
0.11.3 and 0.11.3-pre3 set the pubkey and prvkey objects as private.
This patch removes the SC_PKCS15_CO_FLAG_PRIVATE so IdAlly will work with the
PIV cards.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3221 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-15 15:29:40 +00:00
vtarasov
8222427947
typo, manifested when explicitely using 'reader_drivers = internal;' in opensc.conf
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3211 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-10 12:04:31 +00:00
nils
703edfb68e
improve atr matching for cardos m4.01[a]
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3207 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-07 11:29:12 +00:00
vtarasov
174802aa56
Enables the second PIN (one-time PIN) defined for the same application DF
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3206 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-04 14:25:39 +00:00
nils
8770859315
add support for asepcos
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3200 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-03 20:44:34 +00:00
nils
7c5fe33cfe
re-add cardos m4.01a ATR
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3199 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-03 19:42:34 +00:00
vtarasov
4fcabecf9f
PIN unblock error. Internal pin reference procedure updated.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3198 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-03 15:33:28 +00:00
vtarasov
16c5ab4d5b
Error when output allocation length is not equal to the signature length. 'Compute_signature' now returns the answer's length
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3195 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-03 13:44:45 +00:00
nils
fa12a3dd4f
implement more flexible cardos detection func
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3191 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-25 18:01:26 +00:00
aj
4f0329cd18
silence more gcc/sparse warnings.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3180 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-21 12:01:39 +00:00
aj
9c35397f50
revert change - is needed by pkcs15-syn.c
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3179 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-21 11:34:08 +00:00
aj
047ee1d73e
fix more warnings found by gcc/sparse.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3178 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-21 11:07:00 +00:00
aj
4acfe6b096
fix compiler/sparse warnings.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3177 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-21 10:07:01 +00:00
aj
9946e237de
Douglas E. Engert:
...
Major improvments in the PIV card modules:
* OpenSC-0.11.2 only supported RSA 1K keys, the patch supports RSA 2K and 3K
keys.
* The FASC-N in the CHUID object is used as the card serial number.
* A PIV card may have additional objects. These can now be read by pkcs11-tool
and pkcs15-tool.
* The p15card-helper.c module is no longer used. The code to call the
sc_pkcs15emu_* routines has been moved back into pkcs15-piv.c and uses
existing OpenSC routines to parse the certificate to find the modulus_len.
* pkcs15-piv.c will now get the modulus_len from the certificates to store into
the emulated prvkey an pubkey objects as they are being created using the
sc_pkcs15emu_* routines.
* The caching code that was added to card-piv.c in 0.11.2 is disabled, as
pkcs15-piv.c will cache the certificate using existing OpenSC routines.
* piv-tool will now print a serial number.
* The key-usage bits for prvkey and pubkey objects are set in pkcs15-piv.c
* The PIV "9E" key was added. It is not a private object, and can be used
without a PIN. It is used with the "Certificate for Card Authenticaiton".
* When used with the OpenSSL engine to generate a certificate request, the
public key saved by piv-tool during a "generate asymmetric key pair" card
command can be read from a file pointed at by the environment variable
PIV_9*_KEY. Where * is A, C, D or E.
* In the card_atr section of opensc.conf, flags = 20; can be used to only show
the PIV Authentication cert. This feature was in 0.11.1 but was dropped in
0.11.2 when the p15card-helper.c was introduced.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3174 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-21 07:07:49 +00:00
aj
20985fcfdc
Added the application name to logging to allow for easier debugging. Since a
...
lot of testing needed multiple applications to be running, it became important
to know what application was making each log entry.
This was reported by Russell Larner <rlarner@rsasecurity.com> on 5/17/2007
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3173 c6295689-39f2-0310-b995-f0e70906c6a9
2007-05-25 20:10:34 +00:00
nils
a8908b8548
252 bytes work as well
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3170 c6295689-39f2-0310-b995-f0e70906c6a9
2007-05-13 15:43:22 +00:00
nils
dee4faea64
fix warning
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3169 c6295689-39f2-0310-b995-f0e70906c6a9
2007-05-13 09:32:13 +00:00
nils
37157f38ee
bugfix: try to read at most 248 bytes
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3168 c6295689-39f2-0310-b995-f0e70906c6a9
2007-05-13 09:31:46 +00:00
nils
8135be4166
bugfix: avoid recursion
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3167 c6295689-39f2-0310-b995-f0e70906c6a9
2007-05-13 09:30:53 +00:00
aj
c3438ef4ff
use 255/256 bytes as max_send/recv_size by default.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3155 c6295689-39f2-0310-b995-f0e70906c6a9
2007-04-24 07:52:27 +00:00
nils
91109128c0
request at most for 256 bytes
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3149 c6295689-39f2-0310-b995-f0e70906c6a9
2007-04-15 17:26:42 +00:00
aj
c3fcd9f7dd
Steve Jacobs: fix muscle driver.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3148 c6295689-39f2-0310-b995-f0e70906c6a9
2007-04-10 19:49:26 +00:00
martin
60b4570531
* Add support for SCARD_E_NO_READERS_AVAILABLE to describe errors like:
...
{{{
sc.c:201:sc_detect_card_presence: returning with: Unknown error
SCardGetStatusChange failed: 8010002e
}}}
* When doing a reset with pcsc_reconnect do a cold reset instead a warm one to allow next change
* Change the protocol force feature to change the protocol with a hard reset only when needed to prevent:
{{{
SCardConnect failed: 8010000f
card.c:228:sc_connect_card: returning with: Unknown error
}}}
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3144 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-21 09:41:08 +00:00
martin
fa272faf68
Missing file
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3143 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-21 09:34:10 +00:00
martin
5dba203363
Make sure the right thing is always selected on the card by bypassing cache
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3142 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-21 09:33:40 +00:00
martin
62d2d6cbe0
Simplify esteid detection
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3141 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-21 09:32:36 +00:00
aj
38b9a8091f
add missing header file to noinst_HEADERS.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3132 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-14 18:26:37 +00:00
aj
74610a8fdf
Ian Young: use proper card type for acos5.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3131 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-13 23:10:54 +00:00
aj
1ca622b7f7
Patch by Douglas E. Engert:
...
use c style comments and different header files (for mac os X?).
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3129 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-13 20:57:55 +00:00
aj
97f2569f14
Add acos5 driver by Ian Young.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3128 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-13 13:38:24 +00:00
aj
39b5c42397
test new chop size (256 bytes by default).
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3127 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-12 20:17:29 +00:00
aj
eab8ade2ec
changes by Douglas E. Engert:
...
change the do_decompress* to sc_decompress* and the initialize_* to
sc_pkcs15emu_initialize_* in the new code.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3126 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-12 20:15:39 +00:00
aj
c6954a9c33
full piv update by Thomas harning Jr. and David E. Engert,
...
adding compression etc. Also enables opensc to be compiled
with and without zlib support.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3125 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-10 10:46:32 +00:00
vtarasov
d7758e6c05
after Douglas Engert's remarks on the coding style
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3123 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-07 12:39:52 +00:00
vtarasov
9e33d45edb
some ACLs was forgotten; i compute_signature() le should not be more then 256
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3122 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-07 09:38:01 +00:00
ludovic.rousseau
282000fbae
update Giuseppe Amato email at his request (he is no more working for ST
...
Incard srl)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3120 c6295689-39f2-0310-b995-f0e70906c6a9
2007-03-03 20:24:55 +00:00
ludovic.rousseau
d7a55bb423
correct 3 warning: unused variable 'entry'
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3117 c6295689-39f2-0310-b995-f0e70906c6a9
2007-02-06 14:20:44 +00:00
ludovic.rousseau
71bef700bf
use SCARD_SCOPE_USER instead of the pcsc-lite specific
...
SCARD_SCOPE_GLOBAL
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3116 c6295689-39f2-0310-b995-f0e70906c6a9
2007-02-06 14:17:02 +00:00
nils
a2f622a215
implement support for SHA2 (still experimental)
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3115 c6295689-39f2-0310-b995-f0e70906c6a9
2007-02-02 22:15:14 +00:00
nils
1b4472ca9f
use const, add yet another ACL
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3114 c6295689-39f2-0310-b995-f0e70906c6a9
2007-01-20 12:46:40 +00:00
nils
0ccd6daf8d
improve get_response logic: try to read at least as much bytes
...
as indicated in the 0x61xx response.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3109 c6295689-39f2-0310-b995-f0e70906c6a9
2007-01-09 19:41:05 +00:00
aj
6e32cb6e84
improve atr masking code - also mask atr to match.
...
and add more debugging messages.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3108 c6295689-39f2-0310-b995-f0e70906c6a9
2007-01-09 07:22:58 +00:00
nils
0592929105
remove unnecessary assertion
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3107 c6295689-39f2-0310-b995-f0e70906c6a9
2007-01-08 21:10:07 +00:00
nils
1d1b8779e3
use EVP API for DES encryption
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3106 c6295689-39f2-0310-b995-f0e70906c6a9
2007-01-08 20:19:10 +00:00
nils
3db0036e8d
use EVP api for DES encryption
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3105 c6295689-39f2-0310-b995-f0e70906c6a9
2007-01-08 17:04:39 +00:00
martin
1bee8bf5c6
off by 1
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3104 c6295689-39f2-0310-b995-f0e70906c6a9
2007-01-07 23:40:44 +00:00
martin
30d0066a58
Stop MS visual studio 2005 complaints.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3103 c6295689-39f2-0310-b995-f0e70906c6a9
2007-01-06 16:35:38 +00:00
nils
2e1c80f3fe
use EVP api
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3102 c6295689-39f2-0310-b995-f0e70906c6a9
2007-01-06 13:23:52 +00:00
martin
83862fc356
Properly set the defaults for pcsc reader options even if no configuration file is found/available
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3101 c6295689-39f2-0310-b995-f0e70906c6a9
2007-01-05 16:36:33 +00:00
martin
f747fc0c28
* Add a few debug lines
...
* Remove the locked status from the reader no matter what SCardEndTransaction thinks - either the card was removed or broken pcsc allowed to reset the card while in a transaction (pcsc-lite before Oct. 2006)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3100 c6295689-39f2-0310-b995-f0e70906c6a9
2007-01-05 16:25:31 +00:00
martin
9f1d63a56c
Allow to specify at compile time that a card will work only via pkcs15 emulation. This way no matter what is
...
configured in the config file (try_emulation_first option) the card is usable via pkcs15 tools.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3099 c6295689-39f2-0310-b995-f0e70906c6a9
2007-01-05 16:20:50 +00:00
martin
779326b9e5
Match EstEID based on ATR contents rather than the full ATR itself.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3098 c6295689-39f2-0310-b995-f0e70906c6a9
2007-01-05 16:13:46 +00:00
vtarasov
210bb4a5aa
change encoding
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3097 c6295689-39f2-0310-b995-f0e70906c6a9
2007-01-03 11:44:24 +00:00
vtarasov
58b1931640
prepare Oberthur card support for secure messaging
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3096 c6295689-39f2-0310-b995-f0e70906c6a9
2007-01-02 10:06:32 +00:00
vtarasov
02215882f3
prepare Oberthur card support for secure messaging
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3095 c6295689-39f2-0310-b995-f0e70906c6a9
2007-01-02 10:06:02 +00:00
vtarasov
0d0048e5ad
introduce SC_PATH_TYPE_FROM_CURRENT and SC_PATH_TYPE_PARENT path types
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3094 c6295689-39f2-0310-b995-f0e70906c6a9
2007-01-02 10:04:35 +00:00
aj
dad82e19d7
only the first apdu (command) tells us how many bytes we need to get.
...
we need to keep this value and call get_response as often as needed
to get them part by part.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3093 c6295689-39f2-0310-b995-f0e70906c6a9
2006-12-29 09:44:13 +00:00
nils
d08c8344ec
encode max pin length as well
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3092 c6295689-39f2-0310-b995-f0e70906c6a9
2006-12-22 12:43:00 +00:00
aj
ad79822134
convert to utf-8.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3085 c6295689-39f2-0310-b995-f0e70906c6a9
2006-12-19 21:32:31 +00:00
aj
b3ad2f9dd2
convert to utf-8.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3084 c6295689-39f2-0310-b995-f0e70906c6a9
2006-12-19 21:31:17 +00:00
aj
38720ba5e1
update to latest muscle code.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3080 c6295689-39f2-0310-b995-f0e70906c6a9
2006-12-18 21:58:16 +00:00
nils
0199dfa29b
use net size if available
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3076 c6295689-39f2-0310-b995-f0e70906c6a9
2006-12-18 11:22:22 +00:00
jps
462cd0defc
Initial support for SetCOSXpresso (GemXpresso R4 with EID 2.x applet)
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3070 c6295689-39f2-0310-b995-f0e70906c6a9
2006-12-08 14:56:09 +00:00
aj
31f4fada5b
define these constants where used to kill warnings.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3069 c6295689-39f2-0310-b995-f0e70906c6a9
2006-12-07 10:53:37 +00:00
aj
5610edfc2f
Thomas Harning: patch to fix the MuscleCard driver to work in the
...
case of forced drivers. drv_data is used as a flag so that muscle_init
knows if the applet has been selected during initialization.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3068 c6295689-39f2-0310-b995-f0e70906c6a9
2006-12-07 10:35:40 +00:00
aj
b3822c349b
update the MuscleCard driver for OpenSC to use an msc_id struct rather than
...
int/bytes and messing around with byte-swapping for that. (by Thomas Harning)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3067 c6295689-39f2-0310-b995-f0e70906c6a9
2006-11-30 08:14:16 +00:00
martin
ff5f55417f
Have equal number of sc_lock and sc_unlock loglines to aid debugging locking.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3064 c6295689-39f2-0310-b995-f0e70906c6a9
2006-11-28 11:54:51 +00:00
nils
7164006b44
enable APDU logging again
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3062 c6295689-39f2-0310-b995-f0e70906c6a9
2006-11-23 22:40:01 +00:00
nils
6b40cf4caa
remove unused variable, cleanup
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3061 c6295689-39f2-0310-b995-f0e70906c6a9
2006-11-22 19:27:52 +00:00
nils
9be468b3a8
try to read at most max_recv_size bytes in GET RESPONSE
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3060 c6295689-39f2-0310-b995-f0e70906c6a9
2006-11-21 22:10:11 +00:00
pk
4744121915
Support for DATEV smartcard classic
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3059 c6295689-39f2-0310-b995-f0e70906c6a9
2006-11-18 00:05:48 +00:00
nils
28c6c1ebc1
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3057 c6295689-39f2-0310-b995-f0e70906c6a9
2006-11-12 21:01:01 +00:00
nils
4f1bdbe99d
fix typo
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3056 c6295689-39f2-0310-b995-f0e70906c6a9
2006-11-11 11:47:48 +00:00
nils
651d2c554d
remove useless code
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3055 c6295689-39f2-0310-b995-f0e70906c6a9
2006-11-11 11:46:36 +00:00
nils
c208794ca8
check types before concatenating paths
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3054 c6295689-39f2-0310-b995-f0e70906c6a9
2006-11-11 11:09:57 +00:00
nils
ed2c784d44
update; patch supploed by Douglas E. Engert <deengert@anl.gov>
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3053 c6295689-39f2-0310-b995-f0e70906c6a9
2006-11-10 23:07:45 +00:00
vtarasov
2d4bd463b0
Use do {...} while(0) construction for SC_TEST_RET, SC_FUNC_RETURN and SC_FUNC_CALLED defines
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3050 c6295689-39f2-0310-b995-f0e70906c6a9
2006-11-06 11:15:09 +00:00
nils
7da8984462
set path type; patch supplied by Thomas Irlet <iksiloev@gmail.com>
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3049 c6295689-39f2-0310-b995-f0e70906c6a9
2006-11-02 13:58:58 +00:00
aj
ef012c94f5
Thomas Harning: sc_list_files doesn't return the length of the
...
applicable buffer, but instead the # of files. Fixed.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3047 c6295689-39f2-0310-b995-f0e70906c6a9
2006-11-02 06:55:29 +00:00
pk
1c78d9e688
Netkey E4 emulation
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3046 c6295689-39f2-0310-b995-f0e70906c6a9
2006-10-31 17:29:19 +00:00
nils
01f72933af
add support to parse the seInfo TokenInfo entry, improve aid support in opensc-explorer
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3045 c6295689-39f2-0310-b995-f0e70906c6a9
2006-10-30 18:51:48 +00:00
ludovic.rousseau
bd753c4967
use the OPENSC_DEBUG environment variable to overwite the configuration
...
variable debug in opensc.conf
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3043 c6295689-39f2-0310-b995-f0e70906c6a9
2006-10-30 07:37:44 +00:00
martin
821a009609
New EstEID v1.5 card ATR
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3042 c6295689-39f2-0310-b995-f0e70906c6a9
2006-10-09 15:09:44 +00:00
ludovic.rousseau
07b7abdccd
c_asn1_toki[]: the serialNumber field is not mandatory in ISO 7816-15
...
see
http://www.opensc-project.org/pipermail/opensc-devel/2006-October/009025.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3041 c6295689-39f2-0310-b995-f0e70906c6a9
2006-10-04 07:00:15 +00:00
nils
e2dea71ad4
restore backward compatibility: try READ BINARY in case of a unknown file type
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3039 c6295689-39f2-0310-b995-f0e70906c6a9
2006-10-02 16:49:26 +00:00
ludovic.rousseau
4a296307ac
c_asn1_ddo[]: the oid field of the DDO is not mandatory in ISO 7816-15
...
See
http://www.opensc-project.org/pipermail/opensc-devel/2006-October/009022.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3038 c6295689-39f2-0310-b995-f0e70906c6a9
2006-10-02 13:46:00 +00:00
nils
aeae39f47d
fix warnings
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3035 c6295689-39f2-0310-b995-f0e70906c6a9
2006-10-01 20:52:37 +00:00
nils
7c823d89ca
fix warning
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3034 c6295689-39f2-0310-b995-f0e70906c6a9
2006-10-01 20:39:53 +00:00
ludovic.rousseau
1ac9b2aba1
sc_pkcs15_make_absolute_path(): a 0 length path stays a 0 length pat
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3032 c6295689-39f2-0310-b995-f0e70906c6a9
2006-09-27 12:02:02 +00:00
ludovic.rousseau
45fc350513
iso7816_process_fci(): dump the filename in Hex + ASCII instead of just
...
ASCII in the debug log
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3031 c6295689-39f2-0310-b995-f0e70906c6a9
2006-09-27 12:01:31 +00:00
nils
11779dce60
fix apdu
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3030 c6295689-39f2-0310-b995-f0e70906c6a9
2006-09-26 18:17:14 +00:00
henryk
b45617c451
Make absolute paths from all paths read from the PKCS#15 directories by prepending the DF(PKCS#15) path if necessary.
...
Fixes compatibility with Siemens HiPath SIcurity formatted cards which use relative paths.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3028 c6295689-39f2-0310-b995-f0e70906c6a9
2006-09-26 10:55:02 +00:00
henryk
12c6b11bdd
Fix handling for SIMPLE-TLV records with a three-byte length
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3027 c6295689-39f2-0310-b995-f0e70906c6a9
2006-09-26 10:43:28 +00:00
henryk
325b9480ea
opensc-siemens.diff
...
Adds support for record-oriented files in linear variable, simple-tlv format.
TODO: Add support for all the other file formats, too.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3026 c6295689-39f2-0310-b995-f0e70906c6a9
2006-09-26 10:36:35 +00:00
henryk
5a0e1849d5
Make do { ... } while (...); into while (...) { ... };.
...
Fixes behaviour with empty files.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3025 c6295689-39f2-0310-b995-f0e70906c6a9
2006-09-26 10:31:03 +00:00
nils
f087a937ff
implement workaround for the Taiwanese id card
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3024 c6295689-39f2-0310-b995-f0e70906c6a9
2006-09-24 14:05:06 +00:00
nils
8d38746c28
keep index and count parameters
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3023 c6295689-39f2-0310-b995-f0e70906c6a9
2006-09-24 12:50:41 +00:00
nils
bf389495a8
add starcos spk 2.4 ATR
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3022 c6295689-39f2-0310-b995-f0e70906c6a9
2006-09-22 14:34:51 +00:00
nils
eb3b27709c
bugfix
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3021 c6295689-39f2-0310-b995-f0e70906c6a9
2006-09-22 14:18:22 +00:00
aj
d2e004d09b
ntohl is in ws2_32.lib / dll.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3019 c6295689-39f2-0310-b995-f0e70906c6a9
2006-09-20 12:32:59 +00:00
aj
a39e3824e4
don't forget part10.h (only used on windows I think).
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3018 c6295689-39f2-0310-b995-f0e70906c6a9
2006-09-20 12:10:05 +00:00
nils
1104e92bde
remove check for T0 as it seems to work for T1 as well
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3016 c6295689-39f2-0310-b995-f0e70906c6a9
2006-09-17 18:34:52 +00:00
martin
b1a87b6fa5
Make sure every new opensc instance sees the card from the sight starting point.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3011 c6295689-39f2-0310-b995-f0e70906c6a9
2006-09-04 20:01:20 +00:00
martin
3fab062b09
Update for [2836] chganges.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3010 c6295689-39f2-0310-b995-f0e70906c6a9
2006-09-03 15:58:36 +00:00
martin
adc082b957
* Fix endianness for PCSCv2 part 10 IOCTLs
...
* Add support for start/finish style IOCTLs
* Add support for the same pinpad functionality on windows
Some code from Robert Konklewski and Ludovic Rousseau
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3007 c6295689-39f2-0310-b995-f0e70906c6a9
2006-08-16 16:36:00 +00:00
nils
aec987df38
build fixes for win; patch supplied by Douglas E. Engert <deengert@anl.gov>
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3005 c6295689-39f2-0310-b995-f0e70906c6a9
2006-08-03 21:05:59 +00:00
nils
42ad6be451
win build fixes; patch supplied by Douglas E. Engert <deengert@anl.gov>
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3003 c6295689-39f2-0310-b995-f0e70906c6a9
2006-08-02 19:31:34 +00:00
nils
81fd37e617
fix sc_compare_path_prefix(); patch supplied by Henryk Plötz <henryk@ploetzli.ch>
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3002 c6295689-39f2-0310-b995-f0e70906c6a9
2006-08-01 18:49:08 +00:00
nils
ae5866b244
don't accept invalid OIDs
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2997 c6295689-39f2-0310-b995-f0e70906c6a9
2006-07-13 20:40:50 +00:00
nils
940c67b78a
cardos v4.3
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2996 c6295689-39f2-0310-b995-f0e70906c6a9
2006-07-13 20:37:05 +00:00
nils
d502887f55
bugfixes ...
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2995 c6295689-39f2-0310-b995-f0e70906c6a9
2006-07-13 20:35:17 +00:00
nils
9a5bf3602d
initialize pointer
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2994 c6295689-39f2-0310-b995-f0e70906c6a9
2006-07-13 19:59:23 +00:00
ludovic.rousseau
126593aa01
- use strlcpy() instead of strncpy() to always have a terminating
...
NUL-byte
- use sizeof(field) instead of SC_PKCS15_MAX_LABEL_SIZE-1 or equivalent as
the 3rd argument of strlcpy()
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2993 c6295689-39f2-0310-b995-f0e70906c6a9
2006-07-12 08:12:38 +00:00
ludovic.rousseau
5e922b5325
add -I$(top_srcdir)/src/common so that strlcpy.h is found
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2991 c6295689-39f2-0310-b995-f0e70906c6a9
2006-07-12 08:06:59 +00:00
nils
fdd0baa633
bugfix: return error if OID is invalid
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2986 c6295689-39f2-0310-b995-f0e70906c6a9
2006-07-11 22:25:45 +00:00
nils
c044be5c72
fix typo
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2985 c6295689-39f2-0310-b995-f0e70906c6a9
2006-07-11 21:43:44 +00:00
nils
a29a92686e
changes for cardos 4.3b
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2984 c6295689-39f2-0310-b995-f0e70906c6a9
2006-07-08 12:31:33 +00:00
aj
6287cf4d9b
replace static buffer with dynamically allocated buffer.
...
patch by Tomasz Lemiech to fix a problem with setec cards.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2983 c6295689-39f2-0310-b995-f0e70906c6a9
2006-07-05 19:45:53 +00:00
aj
7dd7df4e7c
Tomasz Lemiech wrote: I found that struct c_asn1_odf[] in pkcs15.c does not
...
define secretKeys object (as specified in PKCS#15 v. 1.1 standard, par. 6.2).
I consider this to be an omission. My Setec card contains objects of this type
and all PKCS#15 operations fail with "Unable to parse ODF". Attached patch
fixes this issue.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2982 c6295689-39f2-0310-b995-f0e70906c6a9
2006-07-05 19:36:26 +00:00
aj
607e85ad9b
add new atr reported by Sven Loeschner as Cryptoflex 32k Card.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2981 c6295689-39f2-0310-b995-f0e70906c6a9
2006-06-27 21:54:24 +00:00
sth
ee37240479
Added doxygen comments
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2980 c6295689-39f2-0310-b995-f0e70906c6a9
2006-06-27 17:56:19 +00:00
sth
bf23c032ca
Endian-independent way to convert numbers to a byte array + vice versa
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2979 c6295689-39f2-0310-b995-f0e70906c6a9
2006-06-27 17:49:19 +00:00
aj
ec38927731
check for environment variable first on windows, too.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2978 c6295689-39f2-0310-b995-f0e70906c6a9
2006-06-26 21:03:11 +00:00
nils
fae6f3feae
fix apdu types and response buffer length
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2977 c6295689-39f2-0310-b995-f0e70906c6a9
2006-06-23 16:09:18 +00:00
aj
f1d9cda57c
the cryptoflex manual states the last two bytes of the atr are some
...
software version so we can ignore them. use the atr mask to do that.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2975 c6295689-39f2-0310-b995-f0e70906c6a9
2006-06-19 23:04:13 +00:00
nils
5c9c6aaff0
fix docu
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2974 c6295689-39f2-0310-b995-f0e70906c6a9
2006-06-19 19:01:39 +00:00
sth
6d96437c4a
The applet returns unexpected values when entering a wrong PIN; this is a work-around by Thomas Harning
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2973 c6295689-39f2-0310-b995-f0e70906c6a9
2006-06-18 20:52:10 +00:00
nils
409fe3a9a0
fix warnings
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2972 c6295689-39f2-0310-b995-f0e70906c6a9
2006-06-17 15:07:49 +00:00
nils
88bae5c923
remove iso logout function, remove dummy logout functions and remove logout call from sc_unlock()
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2971 c6295689-39f2-0310-b995-f0e70906c6a9
2006-06-17 12:24:04 +00:00
nils
5691420588
fix warning
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2970 c6295689-39f2-0310-b995-f0e70906c6a9
2006-06-16 20:47:59 +00:00
sth
50490acca0
Added support for MuscleCard applet. Thanks to Thomas Harning, David Corcoran of Identity Alliance
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2968 c6295689-39f2-0310-b995-f0e70906c6a9
2006-06-07 08:33:37 +00:00
aj
e225efc982
add new card reported to work by Christian Koegler. Thanks Christian!
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2967 c6295689-39f2-0310-b995-f0e70906c6a9
2006-06-06 06:00:51 +00:00
aj
0f64e9d3f1
make objects on piv card public.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2957 c6295689-39f2-0310-b995-f0e70906c6a9
2006-05-20 16:06:42 +00:00
ludovic.rousseau
1c56f74b6c
pcsc_connect(): use an explicit debug message if the reader supports PIN
...
verification/modification but that feature is not enabled in opensc.conf
(enable_pinpad = true)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2954 c6295689-39f2-0310-b995-f0e70906c6a9
2006-05-17 09:07:17 +00:00
aj
77ce30fe26
Douglas E. Engert:
...
removes the private bit on the pubkey. Without this change the openssl req with engine can not be used to generate a certificate request, as it will not be
able to find the public key that should have been saved by the piv-tool when
the private key was generated on the card.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2951 c6295689-39f2-0310-b995-f0e70906c6a9
2006-05-12 20:03:45 +00:00
aj
45007b3da7
compile fixes for win32.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2949 c6295689-39f2-0310-b995-f0e70906c6a9
2006-05-12 20:01:26 +00:00
nils
dd44fd8234
if the card doesn't support a logout functionality it's not an error
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2940 c6295689-39f2-0310-b995-f0e70906c6a9
2006-05-05 10:10:00 +00:00
nils
9b52eebdda
bugfix: Le must be <= buffer size
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2939 c6295689-39f2-0310-b995-f0e70906c6a9
2006-05-05 10:06:38 +00:00
aj
d78f5ad5c2
piv fixes by Douglas E. Engert.
...
This patch will allow a flag in the opensc.conf file to be set to
only expose the PIV authentication certificate and matching keys.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2938 c6295689-39f2-0310-b995-f0e70906c6a9
2006-05-04 06:50:56 +00:00
nils
9e5ed96912
use correct ef attribute in switch statement; thanks to Chaskiel M Grundman <cg2v@andrew.cmu.edu>
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2937 c6295689-39f2-0310-b995-f0e70906c6a9
2006-05-03 07:16:38 +00:00
aj
21c821194b
close memory leaks.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2935 c6295689-39f2-0310-b995-f0e70906c6a9
2006-05-01 10:27:06 +00:00
aj
a48fe86b66
close some memory leaks.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2934 c6295689-39f2-0310-b995-f0e70906c6a9
2006-05-01 10:26:17 +00:00