aj
d501480a29
move renames.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2824 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-23 21:44:37 +00:00
aj
aa2d502ece
rename everything namend "etoken" to "cardos" :)
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2823 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-23 21:43:01 +00:00
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
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
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
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
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
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
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
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
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
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
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
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
4bac6634a1
for example if the card was removed, select file on the main
...
folder will fail. so I think it is best to return the error.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2722 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:51:50 +00:00
aj
51b72267ed
even select_file can fail (if card was removed etc.)
...
so better check the error and return the problem, right?
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2721 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:50:47 +00:00
aj
e49f78a360
fix typo on *paramp test.
...
check alg_info always, not only in some case.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2720 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:49:59 +00:00
aj
252fa4b868
check scconf_find_blocks returning NULL
...
add a free(obj) to the error path.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2719 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:48:43 +00:00
aj
2f200901d6
check file parameter.
...
set file=NULL after freeing it to avoid potential double free.
check key_file parameter before dereferencing it.
check card first, then derefence it.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2718 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:43:04 +00:00
aj
2f8b813d51
sizeof(int[7]) is 28. I think bCommands_pin should have 7 elements, too.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2717 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:41:14 +00:00
aj
e0d645b95b
remove unneeded if(1) block.
...
free temp in error paths.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2716 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:39:58 +00:00
aj
5e03972e41
check if scconf_find_blocks returned NULL
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2715 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:39:00 +00:00
aj
4801c7eadd
check if scconf_find_blocks returned NULL
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2714 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:38:33 +00:00
aj
686297304a
check if scconf_find_blocks returned NULL.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2713 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:37:59 +00:00
aj
d7b6abaef5
add proper free to error path.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2712 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:37:34 +00:00
aj
138dfad842
simply code / remove dead code.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2711 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:36:55 +00:00
aj
2a1c6cb87e
check if scconf_find_blocks returns NULL;
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2710 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:36:26 +00:00
aj
7e15333537
add paranoia: what if scconf_find_bloicks returns NULL?
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2709 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:35:31 +00:00
aj
5ef6ed52a4
add paranoia: check all arguments before
...
dereferencing them to prevent segfaults.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2708 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:33:59 +00:00
aj
bc23ab4cd2
free allocated variable in error path.
...
set rec=NULL after freeing it to prevent
double free'ing.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2707 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:33:11 +00:00
nils
bb63ca1829
fix pkcs15 initialization + fix DIRECTORY command; patch supplied by Giuseppe AMATO <giuseppe.amato@st.com>
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2696 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-02 22:24:09 +00:00
aj
4de18a2552
fix for the combination of cryptoflex, 2048bit keys and
...
some smart card readers by Jean-Pierre Szikora
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2694 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-01 22:18:58 +00:00
nils
0a23e307af
remove senseless and inconsistent checks + cleanup
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2688 c6295689-39f2-0310-b995-f0e70906c6a9
2005-11-26 10:03:38 +00:00
nils
3ac1f94d2b
use unsigned int instead of uint16_t
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2686 c6295689-39f2-0310-b995-f0e70906c6a9
2005-11-25 19:11:09 +00:00
nils
3a803dfe3b
remove disabled code, request FCI only if a file object has been specified
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2685 c6295689-39f2-0310-b995-f0e70906c6a9
2005-11-20 21:53:34 +00:00
nils
ca4eba5861
fix ac for file deletion
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2683 c6295689-39f2-0310-b995-f0e70906c6a9
2005-11-17 10:23:35 +00:00
nils
f74eaee690
fix GET RESPONSE handling
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2678 c6295689-39f2-0310-b995-f0e70906c6a9
2005-10-31 18:44:18 +00:00
nils
b325af7fac
remove deprecated pkcs15 emulation api. Add temporary wrappers for
...
the new functions in some pkcs15 emulation drivers.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2675 c6295689-39f2-0310-b995-f0e70906c6a9
2005-10-30 21:42:35 +00:00