martin
cd5aff8ea0
PC/SC: More return codes are handled.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3726 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 09:03:33 +00:00
martin
446fe0f18d
PKCS#11: Spec does not allow CKR_DEVICE_ERROR from C_Initialize
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3725 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 08:59:58 +00:00
martin
847e0ade96
PKCS#11: translate SC_ERROR_CARD_UNRESPONSIVE
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3724 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 08:56:39 +00:00
martin
17593afa60
Fix iconv handle leak
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3723 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 08:53:38 +00:00
martin
6a48771ce1
Implement CKA_ALWAYS_AUTHENTICATE
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3722 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 08:51:53 +00:00
martin
d672fde449
Remove sc_error and sc_ctx_suppress_errors_* in favor of sc_debug/fprintf
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3721 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 08:46:59 +00:00
martin
d3201511c7
r3717:3719 from trunk
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3720 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-12 11:46:00 +00:00
aj
3dbc0a7143
More Westcos cleanups by Aleksey Samsonov
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3719 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-12 07:04:48 +00:00
aj
e31d2ff966
New westcos driver by François Leblanc.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3718 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-11 09:48:51 +00:00
martin
89e18e51dd
Branch for next major release changes.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3717 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-06 15:56:08 +00:00
aj
886fa8931f
trunk is now post release.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3716 c6295689-39f2-0310-b995-f0e70906c6a9
2009-07-29 07:03:59 +00:00
aj
a495162259
Prepare for new release
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3714 c6295689-39f2-0310-b995-f0e70906c6a9
2009-07-29 07:02:37 +00:00
aj
5f185e3079
Weitao Sun: no one can create more than 15 files
...
under 5015 df. I increase it from 15 to 48, and all are OK.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3713 c6295689-39f2-0310-b995-f0e70906c6a9
2009-07-23 08:56:41 +00:00
aj
61b8f0a35d
Latest version from scute svn with this change:
...
Stef Walter: Make all constants UL that should be.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3712 c6295689-39f2-0310-b995-f0e70906c6a9
2009-07-23 08:30:43 +00:00
aj
0c2fe83c3b
Aktiv Co./Aleksey Samsonov:
...
fix a bug in rutoken driver.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3711 c6295689-39f2-0310-b995-f0e70906c6a9
2009-07-22 12:24:33 +00:00
aj
16f045bf0c
Douglas E. Engert: major update for the PIV smartcard.
...
The major issue is with getting the length of an object or the cert
contained in an object. The PIV card does not have a directory on the card,
So the previous version tried to put off as long as possible the reading
of objects for performance so as to avoid having to read objects that would
not be used. The first standard, NIST 800-73, set maximum sizes for objects.
800-73-2 removed this for certificates.
A certificate object can contain a certificate which might be compressed.
The only way to get the length of the compressed certificate is to decompress
it. Thus the decompressed certificate could be larger then the container object,
so even if the PIV card had a directory, one would still need to decompress
the certificate to find its length.
OpenSC sc_read_binary will use the length obtained by using
sc_select_file(...,&file_out), and thus the lengths must be determined
in sc_select_file.
Change are to card-piv.c and pkcs15-piv.c and include:
* The old cache code which was not working was removed.
* New cache code was added which caches all object read from the card
* If an object has a cert, the cert is decompressed and also cached.
* As part of reading an object the first 8 bytes are read
and this is then used to allocate a large buffer to read in the
object.
* If pkcs15 or pkcs11 asks about a certificate, the cert object
will be read, and the cert decompressed, to get the actual length.
* If piv_select_file is called with the file_out != NULL the object
will be read to get the length If called with NULL it will not be read.
* The enumeration of the objects now starts with 0.
* sc_ctx_suppress_errors_on and off are used to avoid file not found
messages which are are a by product of not having a directory.
* "Unsigned Card Holder Unique Identifier" object in card-piv and pkcs15-piv.c
had conflicting paths, as NIST 800-72-1 had two tables with different
paths. The enumtag for it in card-piv.c was also wrong.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3710 c6295689-39f2-0310-b995-f0e70906c6a9
2009-07-22 10:09:21 +00:00
aj
d9cd831b4f
Douglas E. Engert: The pkcs15-gemsafeV1.c does not detect of the
...
card present is in fact a gemsafeV1 card, and thus it can end up
issuing commands to the wrong cards.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3709 c6295689-39f2-0310-b995-f0e70906c6a9
2009-07-22 10:06:32 +00:00
jps
8529b7ba3e
Add support for JCOP31 v2.4.1 with the modified muscle applet[1].
...
This add support for 2048bit key and extended APDU.
[1] http://www.opensc-project.org/pipermail/opensc-user/2009-June/003147.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3708 c6295689-39f2-0310-b995-f0e70906c6a9
2009-07-02 13:59:38 +00:00
aj
e8b1f540bd
Kalev Lember: fix onepin-opensc-pkcs11.dll manifest embedding
...
with Microsoft compilers.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3707 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-28 10:08:17 +00:00
aj
a3b0d6ae84
Aktiv Co. / Aleksey Samsonov:
...
use generic code instead of identical funciton
(now that the generic code was fixed).
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3706 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-28 07:26:55 +00:00
aj
a2032f5e83
Aktiv Co. / Aleksey Samsonov:
...
use generic set_security_env code, remove duplicate code.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3705 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-28 07:25:47 +00:00
aj
3cf4707b1a
Aktiv Co. / Aleksey Samsonov:
...
Remove dead code.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3704 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-28 07:23:16 +00:00
aj
2a0b63e0ad
Aktiv Co. / Aleksey Samsonov:
...
Add assert() calls to check constant buffer size.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3703 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-28 07:22:24 +00:00
aj
25ab286fed
Aktiv Co. / Aleksey Samsonov:
...
Check buffer length (*outlen)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3702 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-28 07:20:37 +00:00
aj
7d282a9e0e
Aktiv Co. / Aleksey Samsonov:
...
Fix for the case when "apdu.resplen < 2" and checked buffer length.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3701 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-28 07:19:38 +00:00
aj
265eb5923b
Aktiv Co. / Aleksey Samsonov: fix case depending on length.
...
also no need to null resplen or le (done by sc_format_apdu).
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3700 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-28 07:17:19 +00:00
aj
be526c840f
Move emv driver to the end.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3699 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-28 07:11:16 +00:00
ludovic.rousseau
c44b7cbbeb
iso7816_set_security_env(): correctly set P1 parameter in case of
...
SC_SEC_OPERATION_DECIPHER
Thanks to Aleksey Samsonov for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2009-June/012263.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3698 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-25 08:45:05 +00:00
aj
b3e9ce36a4
add a NEWS entry too.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3697 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-24 15:29:59 +00:00
aj
7931ded481
Add new rutoken_ecp driver by Aktiv Co. / Aleksey Samsonov
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3696 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-24 15:26:37 +00:00
ludovic.rousseau
490d1b84aa
print_file(): inverse "write" and "erase"
...
Thanks to Aleksey Samsonov for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2009-June/012212.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3695 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-16 09:17:53 +00:00
ludovic.rousseau
8b4a1f673b
cardos_sm4h(): fix memory leaks. Thanks to cppckeck(1)
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3694 c6295689-39f2-0310-b995-f0e70906c6a9
2009-05-12 14:35:49 +00:00
ludovic.rousseau
dab3723c95
sc_pkcs15emu_add_object(): fix a memory leak. thanks to cppcheck(1)
...
[pkcs15-gemsafeV1.c:419]: (error) Memory leak: obj
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3693 c6295689-39f2-0310-b995-f0e70906c6a9
2009-05-12 14:29:30 +00:00
ludovic.rousseau
bb900ff9b8
do not cast calloc() return value
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3692 c6295689-39f2-0310-b995-f0e70906c6a9
2009-05-12 14:27:39 +00:00
aj
0db85da76a
prep next release.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3689 c6295689-39f2-0310-b995-f0e70906c6a9
2009-05-07 13:09:03 +00:00
aj
3fa5747e33
Fix security issue.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3688 c6295689-39f2-0310-b995-f0e70906c6a9
2009-05-07 10:57:07 +00:00
ludovic.rousseau
dd9a40ad0e
avoid a compilation failure with --disable-openssl
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3687 c6295689-39f2-0310-b995-f0e70906c6a9
2009-05-06 16:25:50 +00:00
alonbl
f0e03ec4f6
Fix --disable-man install from svn checkout, by Ludovic Rousseau
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3686 c6295689-39f2-0310-b995-f0e70906c6a9
2009-04-23 18:02:38 +00:00
alonbl
33a13139c5
Fix --disable-man install from svn checkout, by Ludovic Rousseau
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3685 c6295689-39f2-0310-b995-f0e70906c6a9
2009-04-23 18:00:42 +00:00
alonbl
23e247cafe
Fix GNU libiconv detection
...
By Kalev Lember
The attached patch fixes GNU libiconv detection by adding an additional
libiconv symbol check to autoconf -liconv link test. Right now some
iconv implementations have only iconv* symbols (GNU libc), some have
only libiconv* (GNU libiconv), and some have both defined (Mac OS X's
iconv), so it's necessary to check for both variants.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3684 c6295689-39f2-0310-b995-f0e70906c6a9
2009-04-21 16:43:00 +00:00
martin
09a442adb4
Fix SCardDisconnect reset parameter.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3683 c6295689-39f2-0310-b995-f0e70906c6a9
2009-04-17 07:19:03 +00:00
martin
07fce14a6b
Move sc_check_sw to opensc.h
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3682 c6295689-39f2-0310-b995-f0e70906c6a9
2009-04-15 07:52:04 +00:00
martin
86b4d65c4c
Export sc_check_sw, required by external drivers and utilities.
...
Thanks to Marc Rios Vallès.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3681 c6295689-39f2-0310-b995-f0e70906c6a9
2009-04-15 06:18:49 +00:00
aj
b2f8effbf5
Update news file too.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3680 c6295689-39f2-0310-b995-f0e70906c6a9
2009-04-14 15:21:53 +00:00
martin
6041595895
* Correctly set offsets for PINs for PIN modification operations with pinpads. Thanks to Robert Konklewski.
...
* Only set messages if the reader has display capabilities.
* Detect rejected pinpad commands
* Whitespace fixes
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3679 c6295689-39f2-0310-b995-f0e70906c6a9
2009-04-08 10:31:18 +00:00
martin
16baddcc74
Engine API is not used.
...
Thanks to Robert Konklewski for noticing this.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3678 c6295689-39f2-0310-b995-f0e70906c6a9
2009-04-08 09:40:21 +00:00
alonbl
bfc69348f7
Actually print SCardControl result, thanks to martin
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3677 c6295689-39f2-0310-b995-f0e70906c6a9
2009-04-03 19:54:42 +00:00
alonbl
ef4b1e1410
reader-pcsc - minor cleanups in reader features
...
1. Indent fix.
2. Reorder conditions.
3. Do not print error if SCardControl fails.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3676 c6295689-39f2-0310-b995-f0e70906c6a9
2009-04-03 19:17:15 +00:00
aj
0f050d9cec
Document latest change.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3675 c6295689-39f2-0310-b995-f0e70906c6a9
2009-04-02 10:33:16 +00:00
aj
4670238556
Entersafe changes by Weitao Sun:
...
1.Card type FTCOS/PK-01C added. (new)
2.Limit pin length in range [4,16). (bug fix)
3.Can not unblock PIN. (bug fix)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3674 c6295689-39f2-0310-b995-f0e70906c6a9
2009-04-02 10:32:02 +00:00