Commit Graph

3687 Commits

Author SHA1 Message Date
viktor.tarasov 9b72b24d42 oberthur: forgotten header file
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4138 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-18 17:21:39 +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 42b90f8ada pkcs11-tool: to be compiled without OpenSSL
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4136 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-18 10:49:53 +00:00
viktor.tarasov 0c9b9f21a8 pkcs15init: free cert object if 'link object' failed
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4135 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-18 10:25:50 +00:00
viktor.tarasov ef8e169955 pkcs15init: use encoded public key as the 'content' of private and public key pkcs15 objects
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4134 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-18 10:15:51 +00:00
viktor.tarasov 7d6739feb2 pkcs15init: in pkcs15-init.h don't use parameters name in the function declarations
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4133 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-18 09:49:49 +00:00
viktor.tarasov ecbe32f778 pkcs15init: fix pkcs15-init.h
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4132 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-18 09:46:35 +00:00
viktor.tarasov 8419f95f76 pkcs15init: in pkcs15-init.h, for the function prototypes, homogenize using 'struct *' vs. '*_t'; do not use paramters name
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4131 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-18 09:39:16 +00:00
viktor.tarasov 965ecbf9a1 pkcs15init: pkcs15 card flags
Set 'TOKEN INITIALIZED' after an application has been added,
set 'USER PIN INITIALIZED' and 'LOGIN REQUIRED' after User PIN object has been created.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4130 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-18 09:27:09 +00:00
viktor.tarasov 5eba20e263 pkcs15init emulation: use emu_update_tokeninfo() if available
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4129 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-18 09:20:33 +00:00
viktor.tarasov e214ba206c pkcs15init: emulation API
Four method are added to the 'sc_pkcs15init_operations':
emu_update_dir		-- create or not the DIR file;
emu_update_any_df	-- update the non-pkcs15 descriptors that are equivalents to pkcs15 xDF files;
emu_update_tokeninfo	-- update analog of tokenInfo;
emu_write_info		-- to not create OPENSC-INFO file;


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4128 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-18 09:10:51 +00:00
viktor.tarasov a17e519708 pkcs15-tool: 'verify-pin' is not an action
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4127 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-17 18:24:26 +00:00
viktor.tarasov e0f39c529c pkcs15-init tool: make possible pin verification immidiately after card was binded
It's implemented for the card with emulated pkcs#15 and protected private object attributes.

Update to man pages is comming soon.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4126 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-17 18:16:27 +00:00
viktor.tarasov 69a2fb1941 oberthur: in profile do not use 'combined' pins in ACLs
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4125 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-17 16:45:02 +00:00
viktor.tarasov 5bba49e58c oberthur: in card profile set 'do-last-update' to 'false'
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4124 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-17 16:40:12 +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 84934adab9 don't complain about missing "--slot" parameter, when you don't
need it (if you only "--list-slots").


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4122 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-16 14:59:20 +00:00
aj 5972022ffc Add code to write pubkey objects to pkcs11-tool.
By: Jaroslav Benkovský <jaroslav.benkovsky@nic.cz>

Slightly modified by me.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4121 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-16 14:11:39 +00:00
aj 921a2cc39f Start documenting changes and increse libary version (we are no longer
compatible with 0.11.* line).


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4120 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-16 13:51:39 +00:00
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