Commit Graph

3630 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 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
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 128e066176 pkcs11: no pincache concept at the pkcs11 level -- it's implemented at the pkcs15 one
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4049 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-20 22:16:19 +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 d7dfa2104a entersafe: fix import key RSA 2048 bits
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4046 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-20 10:09:06 +00:00
martin 30924e4e9d PKCS15: set the PRNG flag on PKCS#15 card object even if it was not set in TokenFlags if RNG capability is reported by the low level card driver.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4045 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-20 08:34:40 +00:00
martin 26f1750cd7 entersafe: don't mix hexadecimal and decimal in code and comments
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4044 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-20 08:31:19 +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
flc 6380feb1fd Use cardmod if explicitly request on config only
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4041 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-19 10:41:33 +00:00
viktor.tarasov 9c45262f5e MyEID: fix 'Activate Applet' apdu case
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4040 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-18 17:08:01 +00:00
viktor.tarasov d89e6377a0 MyEID: 'read until the end' not supported -- set maximal receiving size to 255
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4039 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-18 10:26:08 +00:00
viktor.tarasov 4395d5b8b3 MyEID: fix
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4038 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-18 10:08:32 +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
flc 3d23ea782b cardmod updates:
- Add comment to opensc.conf
- Use opensc log in cardmod
- Minor corrections on cardmod pcsc driver


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4036 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-17 07:51:52 +00:00
aj 462f7ac7e8 automake gets packge name and version from AC_INIT.
the old AM_INIT_AUTOMAKE syntax is deprecated now, switch to the new one.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4034 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-16 07:10:45 +00:00
s c4509d3c7b fix SIGABRT (r4028)
*** glibc detected *** invalid pointer: 0x00007fff9e9f7670 ***
Program received signal SIGABRT, Aborted.
0x00007f971d0a8ea5 in raise () from /lib64/libc.so.6
(gdb) bt
#0  0x00007f971d0a8ea5 in raise () from /lib64/libc.so.6
#1  0x00007f971d0aaab3 in abort () from /lib64/libc.so.6
#2  0x00007f971d0e7d58 in __libc_message () from /lib64/libc.so.6
#3  0x00007f971d0ed7e8 in malloc_printerr () from /lib64/libc.so.6
#4  0x00007f971d0efda6 in free () from /lib64/libc.so.6
#5  0x0000000000410f5c in pkcs15_gen_keypair (p11card=0x72aec0, slot=<value optimized out>,
    pMechanism=<value optimized out>, pPubTpl=<value optimized out>, ulPubCnt=<value optimized out>,
    pPrivTpl=<value optimized out>, ulPrivCnt=6, phPubKey=0x7fff9e9f7e50, phPrivKey=0x7fff9e9f7e58)
    at framework-pkcs15.c:1763 /* see opensc-0.11.13 */
#6  0x0000000000409a6e in C_GenerateKeyPair


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4032 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-15 20:55:12 +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
s 22f9b2930e fix memory leaks
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4028 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-12 17:23:02 +00:00