Commit Graph

3613 Commits

Author SHA1 Message Date
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
s 91da9ab819 fix memory leak
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4027 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-12 16:53:07 +00:00
martin 5991dfb433 Remove the dummy EMV driver.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4021 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-11 14:50:18 +00:00
viktor.tarasov 2ab30d8c52 libopensc: 'javacard' driver has to be the last one before 'default' -- thanks to Andreas
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4020 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-11 14:47:34 +00:00
viktor.tarasov 8161c72fa3 libopensc: in
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4019 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-11 14:15:13 +00:00
viktor.tarasov 0330993a61 pkcs15-init tool: simplify 'pristine' test - it's ok if MF, DIR or PKCS15-AppDF is not selectable
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4014 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-11 12:14:03 +00:00
flc 53d29939fd remove useless symbol from libopensc.exports
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4013 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-11 08:46:17 +00:00
aj 485d455fb9 Debian bug report 505396:
-P is not --store-public-key, but --store-pin.
I simply remove the short form "-P" for now (didn't find a good place
to add it).


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4012 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-10 07:59:16 +00:00
aj f621238ff5 AFAIK the default format is PEM, not DER.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4011 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-10 07:44:55 +00:00
aj da83260826 patch from debian bug report 470637 by Philippe Teuwen:
update_binary() was not foreseen by the middleware creators of BELPIC
so I added it, which allows to write some data in the
MF/ID/EF(Preferences) of the card.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4010 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-10 07:40:52 +00:00
viktor.tarasov b8009bec07 libopensc: error message for success
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4009 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-09 15:15:02 +00:00
viktor.tarasov b28add8e3b libopensc: in sc_pkcs15_object introduce the 'content' member
Replace not-used 'der' structure member by the 'content' one.

'Der' member was introduced to keep the ASN1 encoded object attributes. Actually it's not used.
'Content' is intended to keep the object value (AUTH object - pin cache value; CERT object - der value, ...)



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4008 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-09 14:45:07 +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
viktor.tarasov 935b0740e4 libopensc: remove not used function
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4006 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-09 13:53:27 +00:00
aj 3073306989 Add a comment to keep javacard driver 2nd last.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4005 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-06 12:59:24 +00:00
martin 4d56ce2b7b Add a catch-all for (possibly) blank JavaCards. This way known blank JavaCards without a supported applet get recognized by opensc-tool -n.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4004 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-06 10:56:29 +00:00
alonbl f636cc1862 cardmod - build fixups and mingw stuff
1. Add --enable-cardmod to autoconf to enable feature explicitly.

2. Modify opensc-cardmod.dll to always have bitness suffix eg opensc-cardmod32.dll

3. Remove complex cardmod.h detection, could not find any reason for this.

4. Make cardmod.inf a template and inject opensc version into its version string.

5. More minor autoconf/automake cleanups.

6. Remove internal-winscard.h usage in cardmod.c as cardmod.h already includes winscard.h

7. DllMain is not exportable.

Notes:

1. I may caused other build not to work, will happy to work it out.

2. Cannot find reason why cardmod.inf cardmod-westcos.reg should reside in bin directory.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4003 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-05 21:39:28 +00:00
aj a19a966b29 Files generated by automake & friends are not placed in svn.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4002 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-05 13:56:52 +00:00