Commit Graph

209 Commits

Author SHA1 Message Date
Viktor Tarasov 6337149ef7 pkcs15: decode 'seInfo', 'profileIndication', 'lastUpdate'
Encode,decode  'lastUpdate', 'seInfo', 'profileIndication' of TokenInfo (CIAInfo).
Trailing whitespaces.
2012-05-30 09:03:27 +02:00
Viktor Tarasov 9c5dbea883 pkcs11: ECHD and secret keys support from Douglas
This support were initially proposed by Douglas (https://github.com/dengert/OpenSC/commits/ecdh) and
then merged into SM branch (https://github.com/viktorTarasov/OpenSC-SM/tree/secure-messaging).
2012-05-28 20:06:23 +02:00
Viktor Tarasov bf752f3c61 pkcs15: new procedure to find an Auth PKCS#15 object (PIN) by flags 2012-05-25 09:19:19 +02:00
Viktor Tarasov 80266ff466 pkcs15: new procedure to get application by it's symbolic name
At the moment symbolic names for the on-card applications are 'generic', 'protected'.
This distinction used by pkcs11 and minidriver module to select the
'master' application in the cases when only reduced number of slots (one)
can be exposed by module (minidriver) or particular configuration (pkcs11).
2012-05-23 08:50:18 +02:00
Stef Walter 6ed52a06b8 libopensc: Don't fail to allocate memory when mlock fails
* Print out warning when mlock fails, and continue.
 * The warning required a ctx to be passed in, so that means
   changing a few function signatures.

https://www.opensc-project.org/opensc/ticket/389
2012-02-17 10:02:55 +01:00
vtarasov a6b7743088 pkcs15: add comments for the authentication object data type
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5569 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-13 09:23:30 +00:00
jps c5c2366a0b Revert 5558
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5562 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-08 07:58:51 +00:00
jps b422872813 For CardOS 4.3B and 4.4, the Verify Retry Counter Package
can be loaded at ADMINISTRATION life cycle phase to change
the behavior of the VERIFY command in regard to return codes.
When that package is loaded, the PIN can be created with this
"verifyRC" flag in cardos.profile if the return code must be 
ISO7816-4 compliant (63Cx with x being the value of the remaining 
retry counter when required verification has failed).



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5558 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-07 12:44:53 +00:00
vtarasov 226bfaac74 pkcs15: add few attributes to the biometric authentication data type ...
to make happy VS compiler


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5552 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-05 16:51:36 +00:00
vtarasov d888b3fd55 pkcs15: use general 'AuthenticationObject' instead of 'PinObject'
now the attributes of the previous 'pin-info' data type are included
as the sub-type attributes of the general 'auth-info' data .
It will allow to include support of the 'biometricTemplate' and 'authKey' authentication types.

http://www.opensc-project.org/pipermail/opensc-devel/2011-May/016655.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5550 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-05 15:46:25 +00:00
andre a9eba2b205 libopensc: Remove unused parameter 'file_out' in function 'sc_pkcs15_read_file'.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5546 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-05 11:08:36 +00:00
vtarasov a9e9aaee78 gost: GOST key parameters data type, encode gost parameters procedure
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5520 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-29 18:18:43 +00:00
martin 215c133ba0 libopensc: remove more traces of software token/non-native private key related code.
pkcs15-wrap.c can be removed. Clarified/changed the meaning of "insecure" flag to pkcs15-init tool,
which will be needed to explicitly enforce the creation of a key which does not require a PIN.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5510 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-28 22:14:07 +00:00
vtarasov 5e50a14b3f libopensc: introduce 'key-params' data type that contains pointer, size and 'free' handler ...
http://www.opensc-project.org/pipermail/opensc-devel/2011-April/016441.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5413 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-01 19:18:14 +00:00
vtarasov 9376b73d14 EC support: new exported function to fill up the EC parameters data ...
for ex. with the given named curve fills the 'OID' and 'encoded OID' members


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5387 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-22 13:35:57 +00:00
vtarasov 78d90c4765 EC support: introduce data type dedicated to EC parameters ...
EC parameters can be presented in a three forms: namedCurve, OID and implicit data.
This new data type will facilitate manipulation of ec-parameters in the OpenSC tools and library.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5386 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-22 13:08:45 +00:00
vtarasov 38103c64cf pkcs15: new function to encode an OID in DER format
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5380 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-21 14:12:03 +00:00
vtarasov 669a10572a asn1: now sc_der_copy() returns int value
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5379 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-21 13:46:28 +00:00
andre 3169f14b32 libopensc: Removes useless attribute 'file' in 'struct sc_pkcs15_df'
There is no need to carry around that attribute, because it's easy to look up the 'file' as needed. This is done by issuing a single sc_select_file command in sc_pkcs15init_update_any_df (pkcs15-lib.c).

The parameter 'file' of sc_pkcs15_add_df (pkcs15.c) became useless too and was removed in turn.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5316 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-10 04:09:33 +00:00
vtarasov f8ba3ea76d libopensc: general routines to get serialized GUID
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5302 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-07 16:42:23 +00:00
andre ac3a48d7ca pkcs15.h: Fixes type inconsistency, because in [http://www.opensc-project.org/opensc/browser/trunk/src/libopensc/opensc.h?rev=5190#L148 opensc.h] algo_ref is defined as unsigned int.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5299 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-06 22:46:46 +00:00
vtarasov 33f44f8dc1 pkcs15: pin references are always positive integers ...
In the OpenSC versions previous to 0.11.5 the references greater then
127 were erroneously encoded by one byte (negative value ecording to the
ASN.1 rules).
Actually some other proprietary PKCS#15 cards have also this infirmity.

Actual commit makes general the application of the hack used for 'starcos' card.

http://www.opensc-project.org/pipermail/opensc-devel/2011-February/016062.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5220 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-06 12:35:35 +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 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 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 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
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 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
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
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
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
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
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 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 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
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
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 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 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
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
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 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
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
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 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
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
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 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 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 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
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
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 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 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 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 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
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
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
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
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
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
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
ludovic.rousseau 2b8a2f4d90 sc_pkcs15_parse_tokeninfo() and sc_pkcs15_encode_tokeninfo() now use a
(sc_pkcs15_tokeninfo_t *) instead of struct (sc_pkcs15_card *)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2872 c6295689-39f2-0310-b995-f0e70906c6a9
2006-03-07 07:22:58 +00:00
sth 9df2cde416 Add support for reading and writing from/to an EF(UnusedSpace) file; this functionality can be used for deleting and creating pkcs15 objects (that reside in a file)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2769 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-17 19:53:12 +00:00
nils b325af7fac remove deprecated pkcs15 emulation api. Add temporary wrappers for
the new functions in some pkcs15 emulation drivers.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2675 c6295689-39f2-0310-b995-f0e70906c6a9
2005-10-30 21:42:35 +00:00
nils 95200e0f50 add pkcs15 emu function for data objects
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2672 c6295689-39f2-0310-b995-f0e70906c6a9
2005-10-30 19:55:21 +00:00
martin fc3048f55e Remove the (stupid) use_pinpad option from pkcs15 structures
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2482 c6295689-39f2-0310-b995-f0e70906c6a9
2005-08-13 13:04:02 +00:00
nils 44384eccbf - Initial support for TokenUpdate;;lastUpdate field. Change pkcs15 caching
code to use the card serial number and lastUpdate field (if present) to
  specify the cache file. 
- consistently use unsigned data types to specify object types
- make sc_pkcs15emu_get_df a local function (it's not used outside
  pkcs15-syn.c and honestly I see no reason to export it).
- start of a new ChangeLog file (with some intial entries)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2466 c6295689-39f2-0310-b995-f0e70906c6a9
2005-08-05 16:24:35 +00:00
sth b12711e6b3 Reverse the export of function parse_x509_cert()
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2462 c6295689-39f2-0310-b995-f0e70906c6a9
2005-08-04 06:29:35 +00:00
sth 41889b27a1 Export function parse_x509_cert()
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2458 c6295689-39f2-0310-b995-f0e70906c6a9
2005-08-03 09:07:09 +00:00
sth 37cd955055 Allow to seach a data object by it's application OID
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2457 c6295689-39f2-0310-b995-f0e70906c6a9
2005-08-03 09:05:09 +00:00
pisi b6f9aa561b A single flag for all pkcs15 layer applications to detect a) if pinpad is
present b) and if we should make use of it. Also remove the CCID specific
option for pinpad detection - if detected, the flag will anyway always be
set as it reflects the capabilities of the actual reader. Also, the
detection mechanism is changed to be crossplatform.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2236 c6295689-39f2-0310-b995-f0e70906c6a9
2005-03-09 11:45:29 +00:00
nils 5c2f9f72d3 first part of a pkcs15 emulation driver cleanup/rework:
use new api the create pkcs15 objects (note: the part enclosed
in '#ifndef OPENSC_NO_DEPRECATED' statement will be removed
in someday). At first only for pkcs15-esteid.c and pkcs15-starcert.c
but the others will follow soon (including some documentation)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2124 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-02 21:18:54 +00:00
aet c1b0626cdd - Cleanup, typo fix
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2123 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-02 10:21:10 +00:00
nils bd02c1a6be add data field for subject Common{Private|Public}KeyAttributes
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2046 c6295689-39f2-0310-b995-f0e70906c6a9
2004-12-27 13:22:06 +00:00
nils 08826acb4d flags/types are unsigned int, the exponent shouldn't be negative and more const
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2040 c6295689-39f2-0310-b995-f0e70906c6a9
2004-12-22 09:54:41 +00:00
nils 8673508a43 fix memory leak, cleanup: use object specific release method
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2024 c6295689-39f2-0310-b995-f0e70906c6a9
2004-12-18 14:14:57 +00:00
nils 5985415603 some cleanup: 'int' -> 'unsigned int' for flags, 'int' -> 'size_t'
for length + remove some compiler warnings


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1940 c6295689-39f2-0310-b995-f0e70906c6a9
2004-10-17 20:20:59 +00:00
nils 5b4730dabd flags should be stored in a 'unsigned int' (at least this seems to be
the convention in libopensc) => change tokenInfo flags from
'unsigned long' to 'unsigned int'


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1936 c6295689-39f2-0310-b995-f0e70906c6a9
2004-10-17 16:46:34 +00:00
nils 5a328e3dcc update pkcs15 emulation stuff
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1916 c6295689-39f2-0310-b995-f0e70906c6a9
2004-10-08 21:29:55 +00:00
nils 02cbe02bc2 include common object attributes in the sc_pkcs15emu_add_* api
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1781 c6295689-39f2-0310-b995-f0e70906c6a9
2004-05-04 17:58:04 +00:00
sth 345d30a9d6 Moved the sc_pkcs15emu_xxx() functions to pkcs15_syn.c
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1755 c6295689-39f2-0310-b995-f0e70906c6a9
2004-03-08 13:59:27 +00:00
sth 9abadbc711 Increased the maximum number of PINs and removed some unused #defines
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1713 c6295689-39f2-0310-b995-f0e70906c6a9
2004-01-07 09:51:07 +00:00
okir 9ee5c76a4d - Support direct encoding of certs in the CDF
- Added prototypes for sc_der_{copy,clear}
- Changed sc_pkcs15_print_id to return const char *


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1613 c6295689-39f2-0310-b995-f0e70906c6a9
2003-11-19 20:31:52 +00:00
okir d91ecdc245 - Moved sc_pkcs15_bind_synthetic to a separate file
- Moved sc_pkcs15_print_card to ../tests/print.c
- added dll_handle and preferred_language fields to p15card


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1583 c6295689-39f2-0310-b995-f0e70906c6a9
2003-10-31 12:26:24 +00:00
okir d3d7664c11 - Changed the internal object search machinery quite a bit so it
can search for more than one type of object at the same time.
- When enumerating a DF as part of the search, no longer ignore all
  errors.
- When parsing a DF, SC_ERROR_ASN1_END_OF_CONTENTS really means
  we've just reached the end of data in the file, so return 0
  instead


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1573 c6295689-39f2-0310-b995-f0e70906c6a9
2003-10-30 11:43:21 +00:00
okir 9e70efba8a - sc_pkcs15_find_pin_by_reference now searches by reference and path
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1548 c6295689-39f2-0310-b995-f0e70906c6a9
2003-10-21 11:02:48 +00:00
okir 45e820cdac - added sc_pkcs15_find_prkey_by_reference
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1506 c6295689-39f2-0310-b995-f0e70906c6a9
2003-10-13 14:35:27 +00:00
sth 3669fa86e7 Increased the pkcs15 ID size from 16 to 255
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1238 c6295689-39f2-0310-b995-f0e70906c6a9
2003-06-28 07:02:26 +00:00
okir 7fe0ba8749 - fixed typodef in sc_pkcs15_*_info_t (spotted by Nils)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1178 c6295689-39f2-0310-b995-f0e70906c6a9
2003-05-30 09:54:14 +00:00
okir 2abc504051 - remove signedness warnings printed by new gcc
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1176 c6295689-39f2-0310-b995-f0e70906c6a9
2003-05-30 08:54:42 +00:00
okir 27e105540e - added sc_pkcs15_find_pin_by_reference
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1114 c6295689-39f2-0310-b995-f0e70906c6a9
2003-05-15 11:27:38 +00:00
aj 7cbe523cc4 At least the rainbow ikey 3000 need bigger labels.
Label size should be 255, as per pkcs15.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1100 c6295689-39f2-0310-b995-f0e70906c6a9
2003-05-13 13:43:09 +00:00
okir d2075b2c13 - implemented split-key support for CardOS
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1038 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-17 12:38:08 +00:00
okir 3b36593ada - added pkcs15 unblock functionality
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1008 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-14 14:51:42 +00:00