Commit Graph

3630 Commits

Author SHA1 Message Date
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
flc 0e03c6d5cf add cardmod a minidrivers for windows
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4001 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-05 13:05:25 +00:00
aj dc6bc0df4a fix pthread include for win32/mingw compilation.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4000 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-05 11:21:31 +00:00
aj f1471e4a0c Fix bebytes2ushort function, reported by Roland Schwarz.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3999 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-05 06:20:45 +00:00
aj 9406ce2885 Updated piv driver by Douglas E. Engert:
the PIV driver no longer need to set the card max_*_size parameters
   to get around emulating read_binary and write_binary. It can
   now handle partial reads and writes.

   The assumptions for write_binary are that the first chuck will
   have idx = 0, and the last chunk will write the last byte.
   The flags parameter will contain the total length.

   The only write_binary operations are done when initializing
   a card, and this is only done from piv-tool.c which was modified
   to pass in the length and other flags.

   Piv-tool continues to be a primative test tool for inializing test
   cards. But it has been expanded to be able to write other objects
   on test cards.

   The serial number of a PIV  card is obtained from the CHUID object
   if present which has a FASC-N which is an ID number created by the
   issuer. Normally PIV cards are issued the U.S. Federal government
   But there are ways to use the same cards with a non government CA.
   This is then be referred to as PIV Compatible. In this case,
   the FASC-N should start with an agency code = 9999 and an RFC 4122
   GUID should be present in the CHUID. If this is the case, the GUID
   is used as the serial number.

   Windows 7 comes with a PIV card card driver, but to get it use one of
   these card the CHUID is required. (piv-tool can now write one.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3998 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-05 06:16:37 +00:00
aj 119c7751c7 Improved chaining for large APDU commands,
by Mats Andersson and Douglas E. Engert.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3997 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-05 06:14:19 +00:00
s 85613b459d rutoken (ECP): add 4 DF (reserved for internal use)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3996 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-04 12:18:19 +00:00
s 0a4c42ba06 rutoken (S and ECP): never unblock SO PIN
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3995 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-04 10:39:30 +00:00
aj de05af6632 fold ui.c/h into pkcs15-init.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3994 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-04 06:33:33 +00:00
aj 91da321c46 remove log output coloring.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3993 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-04 06:22:50 +00:00
aj b113b90000 remove ui code from library.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3992 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-04 06:19:52 +00:00
martin 314a31f867 [PC/SC / MacOSX] Try to connect to the card twice.
On OS X, when you insert a card, securityd sequentially starts all found Tokend-s to see if a card can be handled with one.
If a non-tokend application waits for a card insertion with sc_wait_for_event and tries to connect to the card right after the system sees it, it will fail with "The reader is in use by another application" 95% of the time.
With this hack connecting to the card succeeds 95% of the time with the probable penalty of an extra second on initialization for non-tokend clients.

This should only affect applications that wait for card insertion events.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3991 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-03 15:46:44 +00:00
s b4a24af66d rutoken (S and ECP): both PINs are globals (and addition to changeset 3960, 3946)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3990 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-03 12:10:41 +00:00
martin b9f844c367 [PKCS#11] use combined constants for events
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3989 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-03 10:10:43 +00:00
martin b3428a684d [tools] If started with --wait, also wait for a reader if necessary.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3988 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-03 09:58:37 +00:00
martin 36992b4001 [PC/SC] detect other events besides card insertion/removal
* remove whitespace.
 * don't use SC_MAX_READERS and allocate memory dynamically.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3987 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-03 09:54:02 +00:00
viktor.tarasov 4c34f5b28c pkcs15init: useless if/else construction
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3986 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-02 18:15:53 +00:00
viktor.tarasov 6afab17c73 pkcs15init: remove commented-out code
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3985 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-02 17:29:17 +00:00
viktor.tarasov b94d9896e1 pkcs15init: little fix
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3984 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-02 17:20:09 +00:00
viktor.tarasov 97ab1858e8 pkcs15init: remove the old commented-out code
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3983 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-02 17:18:06 +00:00
viktor.tarasov 8026eabacd pkcs15init: remove profile option 'keep-public-key' that was used only by oberthur
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3982 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-02 16:45:47 +00:00
viktor.tarasov b065c70695 pkcs15init: abandon Old API
tested with Oberthur, CardOS and SetCOS.




git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3981 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-02 14:50:56 +00:00
alonbl a6f9f023a0 [WINDOWS] Remove tool specific file description support resource file
The implementation was based on the previous MSC build, each tool had its own
description in version resource.

This change sets a single version resource to all files, and produces much
simpler build.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3980 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-02 14:50:42 +00:00
viktor.tarasov 596b8c3c03 oberthur: clean 'global' PIN reference flag when getting byte from ACL
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3979 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-02 14:31:37 +00:00
martin ff4c2c6aa2 Include simclist.h to opensc includes to be able to build OpenSC.tokend
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3978 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-02 12:53:44 +00:00
martin 92debb4b5e PC/SC: Do not try to watch 0 readers on OS X
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3977 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-02 12:01:36 +00:00
viktor.tarasov bf471eaf74 pkcs15init: migrate MyEID to the New API
Migrated without testing, but normally should work -- the pkcs15init part of MyEID and SetCOS are sufficiently close.




git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3976 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-02 09:46:03 +00:00
viktor.tarasov 840053f6ba pkcs15init: migrate MyEID to the New API
Migrated without testing, but normally should work -- the pkcs15init part of MyEID and SetCOS are sufficiently close.




git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3975 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-02 09:44:46 +00:00
viktor.tarasov 976c214a05 pkcs15init: unused variables
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3974 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-02 09:33:29 +00:00
aj ac9f672189 update windows makefiles: only create one dll.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3973 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-01 15:22:28 +00:00
aj e9b3c5982e remove no longer used export files.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3972 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-01 15:20:51 +00:00
aj 4b2fe63ac2 build only one shared library instead of many.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3971 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-01 15:12:53 +00:00
viktor.tarasov 9c7624c81b pkcs15init: sc_verify() has been deprecated (thanks to Martin)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3970 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-01 10:14:04 +00:00
viktor.tarasov 0ce0b37487 pkcs15init miocos: remove obsolete code
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3969 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-01 09:04:10 +00:00