Commit Graph

2574 Commits

Author SHA1 Message Date
aj 823bbffbe6 rename card-etoken.c to card-cardos.c
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2822 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-23 21:39:20 +00:00
martin 0e9037d12f If, for some reasons, card can not be initialized (broken) then
we must make sure that we release all resources (disconnect the card).

If not we can only have 16 tries with a longrunning application (number
of contexts inside pcsclite).




git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2821 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-23 18:09:37 +00:00
martin 9e410e5f6c Some cleanup/fixes in micardo/esteid code related to new apdu.c
Now it works again ;)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2820 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-23 17:37:10 +00:00
martin 723888d623 Negative r has a meaning in the cached file logic, so be sure to reset it to -1
after sc_print_path has returned a value.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2819 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-23 17:29:59 +00:00
aj b07df40932 change more opensc.org references to opensc-project.org till dns is back.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2818 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-22 21:15:07 +00:00
aj 5f94c5f499 moved to opensc-project till opensc.org dns is back.
fix openct references to opensc.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2817 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-22 21:07:00 +00:00
nils 41ee07a708 increase size for bigger keys
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2816 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-21 11:53:30 +00:00
nils e8c05ca648 use more opensc specific names for ASN.1 tags to avoid name conflicts
with other ASN.1 libraries


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2815 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-20 20:52:36 +00:00
aj 059c1ffc5d doc/old is gone.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2814 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-12 09:37:40 +00:00
aj b1322ecd39 remove old man pages (replaced by new man pages in xml format).
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2813 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-12 09:36:58 +00:00
aj 8fac2eaac2 remove old documentation (replaced by wiki).
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2812 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-12 09:36:16 +00:00
nils de4b5c280f - implement thread-safe path printing function sc_path_print() and use
it src/libopensc/ and src/pkcs15init/
- use size_t for the certlen parameter of sc_pkcs15init_update_certificate()


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2811 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-11 23:41:17 +00:00
martin 363d9be861 Get rid of handwritten sc_read_record calls
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2809 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-07 23:40:36 +00:00
nils dc2410a534 the current code requires a pointer to a integer, note: it's actually not a bug when foo_item is NULL as the necessary scconf_item object is created by scconf_item_add_internal
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2808 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-05 22:21:41 +00:00
nils 9f943aa2b4 don't segfault if no config file could be found (win); thanks to Nicolas Justin <nicolas.justin@idealx.com>
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2806 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-04 18:52:52 +00:00
nils fcb7b65010 increase buffer size for the serial number to 9 as we need 8 bytes for serial number plus 1 byte for the terminating 0 character
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2804 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-03 22:46:49 +00:00
sth f674204d63 Add possibility to change pkcs15 attributes (currently only the label)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2803 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-03 16:24:54 +00:00
sth ddd696482b Forgotten to add in r2773
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2802 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-03 14:42:30 +00:00
nils f18b38fe7f summary: -add more general path concatenation function
sc_concatenate_path() and let sc_append_path use it.
         -add function sc_compare_path_prefix to check whether
          a path starts with a certain sub-path (prefix).
         -add some doxygen docu to some path handling functions


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2801 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-01 23:11:00 +00:00
sth e5d0ec212e Typo fixes
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2800 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-30 10:34:29 +00:00
aj 1a5a5c9b76 "cat xxxx" is not supposed to create errors (on record structured files).
so silence it.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2798 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-28 20:20:18 +00:00
nils 6a5c6b2217 fix warnings
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2797 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-28 20:15:32 +00:00
nils 35052fc28a git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2796 c6295689-39f2-0310-b995-f0e70906c6a9 2005-12-28 20:05:28 +00:00
nils fe3e93b625 summary: -complete rewrite of the APDU/transmission handling
code (should now support extended APDUs and is
          hopefully better documented. Note: support for
          the T0 ENVELOPE command is still missing due to
          a lack of test cards).
         -add new APDU case constants SC_APDU_CASE_2 etc.
          which let OpenSC decides, based on the card
          capabilities, whether to use short or extended
          APDUs.
         -add new capability SC_CARD_CAP_RSA_2048 for
          cards supporting 2048 bit RSA operations (note:
          this is more a preliminary hack)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2795 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-28 20:01:43 +00:00
nils 5861f986e9 remove unused variable
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2794 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-28 19:41:11 +00:00
nils f5902e4f0c add support for cardos m4.2 (still experimental)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2793 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-28 19:38:55 +00:00
martin e1d7384e8a If there's less data ina file/record than requested do not fail but return as much data as was available. This behaviour is similar to read(2).
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2792 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-27 14:11:35 +00:00
martin 0548ceb618 If SCardControl fails there's nothing bad going on - just there's no support for this feature.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2791 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-27 13:41:23 +00:00
martin bd646762bf hav commented configuration lines have the opposite values of hardcoded defaults.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2790 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-27 13:39:51 +00:00
aj 07fc5e4d04 use svn revision based version numbers.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2787 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-26 23:09:44 +00:00
aj 86c4e23ec5 tcos update by peter koch, adds interoperability with th darmstadt cards.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2784 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-26 18:50:21 +00:00
sth d1eec6aca7 Added default debug/log file locations for Windows
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2782 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-23 11:23:29 +00:00
sth 551bcc89fa Referted the 'Fireofox 1.5' fix in log.c and replaced it by letting a blocking C_WaitForSlotEvent() return CKR_FUNCTION_NOT_SUPPORTED. This isn't a solution for the multihread problems (things hang or try to log to a released context) but at least it solves the Ff 1.5 problems
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2777 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-23 10:15:17 +00:00
nils e56c7a9110 use correct apdu case and set Le value
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2775 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-22 15:54:44 +00:00
nils 573ce9c9e5 suppress errors when EF(unusedSpace) is missing
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2774 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-21 21:19:37 +00:00
sth df6657ea18 Belongs to the rev. 2769 patch for adding EF(UnusedSpace) support
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2773 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-18 07:54:18 +00:00
nils ced2df6b1a remove unused variables
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2772 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-17 21:52:53 +00:00
nils 103979ec37 fix key usage flags and ensure that we are in the correct lifecycle
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2770 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-17 20:54:29 +00:00
sth 9df2cde416 Add support for reading and writing from/to an EF(UnusedSpace) file; this functionality can be used for deleting and creating pkcs15 objects (that reside in a file)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2769 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-17 19:53:12 +00:00
nils 9ce3f13bac add cardos m4.2 and print the startkey version in hex
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2767 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-16 20:52:01 +00:00
aj b2400d0795 pkcs15-tool needs openssl_libs also, if it is available.
only older gcc versions found this problem, it seems.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2765 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-14 10:59:57 +00:00
nils 1376a07cfa fix APDU case
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2764 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-12 20:38:19 +00:00
sth 912946bf3f Fix for ticket #45: Firefox 1.5 and new Mozilla's crash when they are closed because there's a blocking C_WaitForSlotEvent() called from another thread then the 'main' thread that calls C_Finalize(); and this cause C_WaitForSlotEvent() to log to a NULL context -> assertion failure.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2762 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-08 20:25:54 +00:00
ludovic.rousseau fc763ba5d5 etcos_create_file_44(): use sizeof(pins)/sizeof(pins[0]) instead of a
constant (7)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2761 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-08 09:05:56 +00:00
aj dce7d0024c oops, parm points to the first char, not to a pointer to the string.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2730 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 22:09:28 +00:00
aj 1475978af5 remove unused variable item in scconf_put_str.
remove unused variable ret in scconf_put_int.
from the readme: "if parm not NULL, then ... parm points to ..."
so we need to get the value of the location where it points to.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2729 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 22:07:54 +00:00
aj a533dc1292 free pub_buff in error path.
removed unused pubfile variable and dead code.
check prvfile != NULL.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2728 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:59:04 +00:00
aj 71c91425c7 check prkf != NULL.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2727 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:58:04 +00:00
aj e5ffc57e92 free profilke and pin_obj in the error path.
check res_obj and keybits/keyargs before dereferencing.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2726 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:57:07 +00:00
aj dc790e985b check p15card != NULL before accessing it.
in the error path free file if it was allocated.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2725 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:55:03 +00:00