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
aj
40c67035c5
no code change, only easier to parse :)
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2724 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:53:13 +00:00
aj
ad844b0f74
also check that priv->p15card is not NULL.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2723 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:52:33 +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
aj
4863fb752d
free buf if pin was entered incorrectly.
...
check if file is not NULL (out of memory).
free file, if something goes wrong.
free pin/puk once no longer needed.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2706 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:31:20 +00:00
aj
131842c80b
make code easier by removing match variable.
...
check if cert was returned != NULL.
free cert if there is some error.
set variables to NULL after being freed,
to avoid potential double free bugs.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2705 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:29:54 +00:00
aj
cdc3044082
proper cleanup: close files if something goes wrong.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2704 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:27:44 +00:00
aj
365196594c
check publickey variable before de-referencing.
...
change newpin to NULL so it can't get free'd twice.
allocate buf from heap, not stack (quite large).
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2703 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:27:05 +00:00
aj
93dae31ca7
#if out the dead code.
...
remove some dead code in the hexdump code.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2702 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:25:08 +00:00
aj
2357ff6c66
does not work, will segfault.
...
also no need to assign foo_item all the time,
scconf_item_add returns the item parameter,
so it does not change.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2701 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:22:42 +00:00