Commit Graph

477 Commits

Author SHA1 Message Date
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 1bd07bacd6 pkcs15init profile: syntax error can provoke segmentation fault
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4080 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-03 17:22:01 +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
viktor.tarasov 70ee7c1438 pkcs15init: in sc_pkcs15init_add_object() if DF update fails, remove object from the list before return
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4076 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-01 15:29:39 +00:00
viktor.tarasov dbd315c7e9 profile: 'cbs' member of 'struct sc_profile' is not used
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4075 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-01 14:01:25 +00:00
viktor.tarasov bb6ccdb9fb pkcs15init oberthur: no extractable key; for generated key set reference from the key's path
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4073 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-01 13:36:02 +00:00
s adf4035d86 fix mistake in r4065
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4068 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-24 08:57:37 +00:00
s 839644bb4e add check params; fix: pkcs15-rutoken.c:208: warning: unused parameter 'puk'
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4065 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-24 08:22:24 +00:00
viktor.tarasov 9485f168ee pkcs15init: 'defined bu not used'
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4062 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-21 20:33:51 +00:00
viktor.tarasov 535131adda pkcs15init: instead of static keycache use the pincache as a content of the pkcs15 AUTH object
Tested with cards:
CardOS v4.3B;
SetCOS 4.4.1B;
Oberthur;
Cryptoflex 16k, 32k e-gate, 32k e-gate token;
GPK 8K;
Athena;
Aventra;
Fetian;
Rainbow 3000 (STARCOS SPK 2.3)




git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4058 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-21 18:24:41 +00:00
viktor.tarasov 4dd6abf41b pkcs15init: in the prototypes of the internal procedures the 'struct sc_card' argument replaced with the 'struct sc_pkcs15_card' one
This patch is not largely tested and it will be followed (hope in a few hours) with another one 
that will replace the using of the static pincache 
with the pincache as the content of the AUTH pkcs15 object.

In the intervention into the card specific part I tried to respect its creator's coding style.
Sorry, if it's not always the case.




git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4057 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-21 16:21:57 +00:00
viktor.tarasov e5233e7297 cyberflex: no more 'protect-certificates' profile option
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4051 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-20 23:20:38 +00:00
viktor.tarasov ef919e94d4 pkcs15init: 'protect-certificates' profile option not used
Profile option 'protect-certifcates' was activated by default for all the cards, 
was mentioned and commented out only in 'flex' profile,
and finaly is not working 'by design' of pkcs15-lib.c

So, no need to keep this option, untill the valid arguments to restore it back.
Anyway, the access to certificates is controlled by the file's ACLs defined in profile.


;in profile use the 'define' macros to define the pin encoding type;



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4050 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-20 23:14:45 +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 ac5307d457 pkcs15init: when updating 'OpenSC Info' file, cleanup its non-used tail part -- thanks to Xiaoshuo
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4047 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-20 20:09:22 +00:00
viktor.tarasov ba3299bcef entersafe: sorry, fix
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4043 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-19 16:52:50 +00:00
viktor.tarasov 9bf12ba47f entersafe: unify cards behavior - don't throw error when erasing empty card
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4042 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-19 16:41:05 +00:00
s 709869785c fix: mis-usage of 'type' (PIN encoding style)
Thanks to Viktor TARASOV
http://www.opensc-project.org/pipermail/opensc-devel/2010-February/013454.html



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4037 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-17 17:19:14 +00:00
viktor.tarasov 42d7d22841 pkcs15init profile: accept the minimal file-ids difference from GPK profile
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4030 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-15 17:47:20 +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
s 85613b459d rutoken (ECP): add 4 DF (reserved for internal use)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3996 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-04 12:18:19 +00:00
s 0a4c42ba06 rutoken (S and ECP): never unblock SO PIN
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3995 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-04 10:39:30 +00:00
s b4a24af66d rutoken (S and ECP): both PINs are globals (and addition to changeset 3960, 3946)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3990 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-03 12:10:41 +00:00
viktor.tarasov 4c34f5b28c pkcs15init: useless if/else construction
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3986 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-02 18:15:53 +00:00
viktor.tarasov 6afab17c73 pkcs15init: remove commented-out code
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3985 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-02 17:29:17 +00:00
viktor.tarasov b94d9896e1 pkcs15init: little fix
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3984 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-02 17:20:09 +00:00
viktor.tarasov 97ab1858e8 pkcs15init: remove the old commented-out code
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3983 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-02 17:18:06 +00:00
viktor.tarasov 8026eabacd pkcs15init: remove profile option 'keep-public-key' that was used only by oberthur
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3982 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-02 16:45:47 +00:00
viktor.tarasov b065c70695 pkcs15init: abandon Old API
tested with Oberthur, CardOS and SetCOS.




git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3981 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-02 14:50:56 +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 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
viktor.tarasov 976c214a05 pkcs15init: unused variables
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3974 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-02 09:33:29 +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 e9b3c5982e remove no longer used export files.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3972 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-01 15:20:51 +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 9c7624c81b pkcs15init: sc_verify() has been deprecated (thanks to Martin)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3970 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-01 10:14:04 +00:00
viktor.tarasov 0ce0b37487 pkcs15init miocos: remove obsolete code
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3969 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-01 09:04:10 +00:00
viktor.tarasov 167aed7c1f pkcs15init: migrate setcos to the New API
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3968 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-31 20:29:58 +00:00
viktor.tarasov 7f52a0267f pkcs15init cardos: fix update keys
When creating application DF ('PKCS15-AppDF'), User PIN is not yet created, and AC type 'SC_AC_SYMBOLIC' cannot be resolved.
So, in the card profile, the macro '$PIN' cannot be used to define the ACLs of the application DF.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3967 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-31 20:26:45 +00:00
viktor.tarasov b83ed7ed71 sertcos: both PINs are globals
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3965 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-29 17:41:05 +00:00
viktor.tarasov 19e9aaf635 pkcs15init: fix putting xPINs in cache
;when putting SOPIN into the global cache, use the path from the object info;
;sc_pkcs15init_create_pin() can be called to create PUK object;




git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3964 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-29 17:40:03 +00:00
viktor.tarasov 742b0ea341 pkcs15init: one more fix
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3963 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-29 17:12:53 +00:00
viktor.tarasov 2bcd535284 pkcs15init: fix
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3962 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-29 17:08:26 +00:00
viktor.tarasov 90ba3c769d pkcs15init: card specific pkcs15init has to be ready for pin_reference = -1
Starting from r3946, the reference of PIN, instantiated from profile, is not overwritten by 0 in sc_pkcs15init_create_pin().
http://www.opensc-project.org/opensc/browser/trunk/src/pkcs15init/pkcs15-lib.c?rev=3946#L1064

So, card specific pkcs15init has to be ready for the pin_reference = -1. 




git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3960 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-28 16:44:02 +00:00
viktor.tarasov 630eb213f4 miocos: migration to New API
Miocos card owners are heartly invited to test this revision.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3956 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-28 12:46:36 +00:00
viktor.tarasov 031bfc7a07 pkcs11: parametrize disabling of the slot for PUK
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3953 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-28 12:14:48 +00:00
viktor.tarasov 660fdea68a profile: for PIN flags use rather 'define' macro
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3951 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-27 18:18:10 +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