Commit Graph

3668 Commits

Author SHA1 Message Date
viktor.tarasov c74016b8cc fix #202: pkcs15-tool: print message when there is PIN verify error
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4119 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-15 17:58:17 +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
aj 0fdb4478bc On blank, but otherwise perfectly supported card, we get an error here
(with "Unsupported card"). This needs to be improved.

This patch changes the "initialization" to "binding", so we at least
can tell people: you need to initialized an empty card first.
Needs to be improved of course.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4117 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-15 10:34:18 +00:00
viktor.tarasov da9aa435c4 fix second part of #199: pkcs15init: when freeing pkcs15 object remove it from list
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4116 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-15 08:36:36 +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
viktor.tarasov e5300b1c2d fix #199: to authenticate 'update' in sc_pkcs15init_update_file() use the file instantiated from profile, rather then selected one
This bug concerned the card drivers for which the file ACLs cannot be obtained from the FCI of the selected file.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4114 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-13 23:35:08 +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
aj 5bc11ac39c Redirect output to file given by "--output" / "-o" option. Closes bug #200.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4112 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-13 22:47:58 +00:00
aj c1bb3ae9cd compile tools with PTHREAD so we can debug them in GDB.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4111 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-13 22:26:07 +00:00
viktor.tarasov 8b15f0f340 pkcs15init: sc_pkcs15_add_df() has no more 'handler' parameter
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4110 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-13 19:54:28 +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
viktor.tarasov f9b27b1699 pkcs15-tool: 'pkcs15_pin_info' parameter replaced by 'pkcs15_object'
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4107 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-11 13:00:07 +00:00
martin 72a9d8e58f pkcs15-init: sign key usage shortcut does not expand to non-repudiation.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4106 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-11 11:23:47 +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 af1bf44cef framework-pkcs15: fix
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4104 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-10 15:03:20 +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 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