Commit Graph

3650 Commits

Author SHA1 Message Date
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 b6cd025106 pkcs11 framework-pkc15: at user login try to do the postponed private keys load
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4099 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-09 17:38:08 +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 6cb0c93ee3 pkcs11: configuration option to report as zero the CKA_ID of CA certificates
In fact, the middleware of the manufacturer of the gemalto (axalto, gemplus) cards
reports the CKA_ID of CA certificates as '0'.

But it's not true for the others middlewares (Oberthur), NSS (afais) and PKCS#11 standard.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4097 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-09 16:57:39 +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 e47baeaf9e pkcs11: configuration option to report as zero the CKA_ID of CA certificates
In fact, the middleware of the manufacturer of the gemalto (axalto, gemplus) cards
reports the CKA_ID of CA certificates as '0'.

But it's not true for the others middlewares (Oberthur), NSS (afais) and PKCS#11 standard.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4095 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-09 15:43:16 +00:00
viktor.tarasov 54d2b20fe2 pkcs11 framework: change prototype of the 'login' method
It gives the access to the 'slot' object inside the framework method 'login'.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4094 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-09 15:05:29 +00:00
viktor.tarasov 93210eae9f pkcs15-tool: add 'verify-pin' option" src/tools/pkcs15-tool.c
Implemented to have the possibility to verify PIN after binding of the pkcs15 card and before any 'substantial' operation.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4093 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-09 14:51:48 +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
martin bd93c92b23 win32/Makefile.am:1: whitespace following trailing backslash
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4089 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-05 19:31:07 +00:00
viktor.tarasov aff7b5523c pkcs15init: homegenize pin reference type in a different structures; remove unused parameters in the internal procedures;
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4088 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-05 10:37:11 +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
viktor.tarasov 3a424cf26a pkcs15init: dummy object is not needed for the sc_pkcs15_find_XX() procedures; coding style issues
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4086 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-04 16:14:30 +00:00
viktor.tarasov 0e8e1a1bf0 pkcs15init cflex: fix protected initialisation
In the 'flex' card profile the ACLs of the public objects are set to 'NONE'.

As the pkcs15init core currently implemented, the AuthID attribute is not used for the public objects. 
Without AuthID the destination 'pin-domain' DF cannot be determined in a simple and sure manner.
That's why 'pin-domain' works only for private key, private data
and the public objects are placed into the application DF. 


; take 'flex' CHV files settings from the card profile;






git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4085 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-04 13:37:11 +00:00
viktor.tarasov de3e6aeba9 pkcs15init: prepare instantiation of the pin-domain templates
When binding profile and p15card (in sc_pkcs15init_set_p15card()), add to the profile EF list the named DF for the path of the all existing AUTH.

; variables name and coding style issues;
; debug messages;


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4084 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-04 13:05:03 +00:00
viktor.tarasov 21acf3ed3d pkcs15init profile: fix indexed instantiation of pin/key domain; more of debug messages
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4083 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-04 12:55:09 +00:00
viktor.tarasov 5d08b13f98 pkcs15init asepcos: unused variables
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4082 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-04 12:49:12 +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 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 abd3a43b3e include: do not create link to the non-existing ui.h
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4074 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-01 13:51:05 +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
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 cf4ec4ab3f #47: C_SignRecover is not implemented at the moment, don't give any promises with C_SignRecoverInit either.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4071 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-24 14:06:04 +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
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
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
aj 9e64de79e4 Remove openssh/ directory and our patch for openssh,
as they removed the opensc code in favor or new pkcs#11 code.
This new code works out of the box with opensc-pkcs11.so, 
so we don't need the patch any more.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4066 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-24 08:25:13 +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
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
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
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
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
martin e88839475a Missing piece from [4055]
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4056 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-21 11:10:30 +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
martin b8e921b2d2 manpages: don't install sc_* API documentation.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4054 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-21 09:13:00 +00:00
martin ba4b02e098 pkcs15-init: don't suggest using --erase-card with --create-pkcs15 in help message.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4053 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-21 09:09:33 +00:00
martin 9d603a61e8 manpages: Clarify pkcs15-init --erase-card usage. Fix XML structure from [4012]
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4052 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-21 09:08:13 +00:00