Commit Graph

7701 Commits

Author SHA1 Message Date
Frank Morgner 12218d4b0b prepare 0.20.0 2019-09-05 14:24:30 +02:00
Frank Morgner 64d3d81036 fixed invalid free 2019-09-05 08:51:13 +02:00
Frank Morgner 769db0297b fixed memory leak
Credits to OSS-Fuzz
2019-09-02 09:43:50 +02:00
Peter Popovec 5b8095ca2c string null-termination fix
strncpy does not generate null-terminated string, fixed by memcpy.
2019-09-02 09:32:12 +02:00
Frank Morgner f621305140 fixed undefined behavior when parsing negative ASN.1 Integer 2019-08-30 23:45:40 +02:00
Frank Morgner 3e110995bc fixed undefined behavior
Credits to OSS-Fuzz
2019-08-30 23:45:40 +02:00
Frank Morgner e971ffb48e fixed memory leak
Credits to OSS-Fuzz
2019-08-30 23:45:40 +02:00
Frank Morgner 849de1d9e3 fixed memory leak when parsing malformed PKCS#15 data
Credits to OSS-Fuzz
2019-08-30 23:45:40 +02:00
Frank Morgner 6f40e9c553 Unbreak Travis build 2019-08-30 23:15:53 +02:00
Frank Morgner f5bea72637
Add support for 4K RSA keys in CardOS 5 (#1776)
fixes https://github.com/OpenSC/OpenSC/issues/1764
2019-08-29 09:43:37 +02:00
Frank Morgner b5b0991ec0 Travis: test openpgp key generation 2019-08-28 11:06:55 +02:00
Frank Morgner a1d3e76999 openpgp: handle cards with static algorithms
fixes https://github.com/OpenSC/OpenSC/issues/1659
2019-08-28 11:06:55 +02:00
Jakub Jelen 530175009c tests/common: Add different path to softhsm pkcs11 library to test also on different architectures 2019-08-28 11:01:50 +02:00
Jakub Jelen cc9020f56a pkcs15-sc-hsm: Avoid potential memory leaks 2019-08-28 11:01:50 +02:00
Jakub Jelen fb67ffdca6 pkcs15-sc-hsm: Avoid potential memory leaks 2019-08-28 11:01:50 +02:00
Jakub Jelen 14e1f3c4d3 pkcs15-tccardos: Make sure we do not overrun buffers in this wild parsing 2019-08-28 11:01:50 +02:00
Jakub Jelen 489886724f pkcs15-tccardos: Avoid negative indexing 2019-08-28 11:01:50 +02:00
Jakub Jelen cab5d3da17 iasecc-sdo: Avoid potential memory leak 2019-08-28 11:01:50 +02:00
Jakub Jelen 070a37cebd card-authentic: Avoid potential memory leaks 2019-08-28 11:01:50 +02:00
Jakub Jelen 1b32bfe4e5 card-coolkey: Avoid potential null dereference 2019-08-28 11:01:50 +02:00
Jakub Jelen 24eaa3eaa1 card-jcop: Avoid left-shift of negative values 2019-08-28 11:01:50 +02:00
Jakub Jelen 2f643948f1 ctx: Avoid potential memory leaks reported by clang 2019-08-28 11:01:50 +02:00
Jakub Jelen 14dec11ebd travis-ci: Try to run the tests with more recent distros
The javacard simulation unfortunately does not work with anything newer
2019-08-28 11:01:50 +02:00
Frank Morgner bdca524aa8 Fixed memory leak
Credits to OSS-Fuzz
2019-08-27 15:59:46 +02:00
Frank Morgner 03ea3f719c fixed memory leak
Credits to OSS-Fuzz
2019-08-27 15:40:32 +02:00
Frank Morgner 9b4b080be7 fixed compiler warning 2019-08-27 15:27:15 +02:00
Frank Morgner a3fc7693f3 Fixed out of bounds access in ASN.1 Octet string
Credit to OSS-Fuzz
2019-08-27 15:21:46 +02:00
Frank Morgner 412a6142c2 fixed out of bounds access of ASN.1 Bitstring
Credit to OSS-Fuzz
2019-08-27 15:19:22 +02:00
Ludovic Rousseau 2bfd022180 pkcs11-spy: add support of CKM_*_PSS in C_VerifyInit()
In bdb1961dee the same code was added to
C_SignInit(). Now it is also used in C_VerifyInit().
2019-08-27 14:52:10 +02:00
Frank Morgner 2eab2bcd74 fixed out of bounds accessing array
Credit to OSS-Fuzz
2019-08-27 14:00:34 +02:00
Ludovic Rousseau 2240abcef1 spy: display -1 instead of 18446744073709551615
buf_len is a CK_ULONG (unsigned long). But if the attribute is sensitive
or is not extractable or is invalid for the object then the library set
the buffer length value to (CK_LONG)-1.

It is more friendly to see "-1" instead of "18446744073709551615" (on
64-bits CPU)
2019-08-26 10:53:09 +02:00
Ludovic Rousseau 43a8f870e5 pkcs11-spy: add support of CKA_OTP_* values 2019-08-26 10:18:04 +02:00
Ludovic Rousseau e35a7e7395 Add definition of CKA_OTP_* constants 2019-08-26 10:17:05 +02:00
Pierre-Louis Palant b0241eefa1 Integrated virt_CACard in CI jobs (#1757)
Was: "Implement OpenSC CI without HW cards" (https://github.com/OpenSC/OpenSC/pull/1757)
2019-08-20 15:17:14 +02:00
Frank Morgner 9099d95c77 fixed interface change
fixes https://github.com/OpenSC/OpenSC/issues/1768
2019-08-20 14:21:44 +02:00
Peter Popovec d7a86d397f opensc-tool: do not connect card if not neccesary, fix util.c errors
opensc-tool: for options --version, --list-readers, -D, etc. we do not
need to connect card/reader. This removes unnecessary error messages
if card is not present in card reader or if reader is not available.
util.c: use symbolic error codes, pass error codes to caller without change.
2019-08-20 13:38:51 +02:00
Frank Morgner b6be87a348 make sc_format_apdu_ex agnostic to card properties 2019-08-20 13:38:20 +02:00
Frank Morgner 0c563df0c1 document sc_format_apdu_ex() 2019-08-20 13:38:20 +02:00
Frank Morgner 0e97ef2ce3 don't use sc_format_apdu_ex in default driver
fixes https://github.com/OpenSC/OpenSC/issues/1731
closes https://github.com/OpenSC/OpenSC/pull/1734
2019-08-20 13:38:20 +02:00
Frank Morgner 8dc67e6a61 use statement for noop 2019-08-20 13:38:20 +02:00
Raul Metsma fdf80761cf Remove duplicate code
Signed-off-by: Raul Metsma <raul@metsma.ee>
2019-08-20 13:38:00 +02:00
Jakub Jelen 9b47462a51 Fix portability warning from coverity
CID 344928 (#1 of 1): Sizeof not portable (SIZEOF_MISMATCH)
suspicious_sizeof: Passing argument object_handles of type CK_OBJECT_HANDLE_PTR and argument objects_length * 8UL /* sizeof (CK_OBJECT_HANDLE_PTR) */ to function realloc is suspicious. In this case, sizeof (CK_OBJECT_HANDLE_PTR) is equal to sizeof (CK_OBJECT_HANDLE), but this is not a portable assumption.
2019-08-20 13:28:54 +02:00
Jakub Jelen 1a0a8e637b p11test: Check return values
CID undefined (#1 of 1): Unchecked return value (CHECKED_RETURN)
10. check_return: Calling RSA_set0_key without checking return value (as is done elsewhere 7 out of 8 times).
2019-08-20 13:28:54 +02:00
Jakub Jelen 818aa5b69c p11test: Avoid possible issues reported by coverity
* The fail_msg() in cmocka has a way not to fail, which confuses coverity. Adding explicit retunr/exit should address this issue
 * Reformat some code in p11test
2019-08-20 13:28:54 +02:00
Jakub Jelen 2958b71c9a typo 2019-08-20 13:28:54 +02:00
Frank Morgner 7d8009e429 PC/SC: handle resets in SCardTransmit
fixes https://github.com/OpenSC/OpenSC/issues/1725
2019-08-20 13:25:06 +02:00
Frank Morgner aa489baf74
md: added missing cardos5 ATRs (#1750)
fixes https://github.com/OpenSC/OpenSC/issues/1735
2019-08-20 13:24:33 +02:00
Frank Morgner 8f838bc1e0 fixed passing LIB_FUZZING_ENGINE 2019-08-19 16:44:54 +02:00
Peter Popovec 426772298a pkcs15-tool: inconsistent -r option fix
Option -r is used in other opensc tools to specify card reader.  pkcs15-tool
uses -r to specify cerfificate.  This fix intorduces warning message if -r
is used, and for future versions of pkcs15-tool -r is used to specify
reader.
2019-08-05 01:14:35 +02:00
Doug Engert 93bdc8c826 Support OpenSSL when deprecated defines have been removed Fixes 1755
sc-ossl-compat.h will check if OpenSSL has been built with or without some
deprecated defines. OpenSSL will provide defines for some of these if
built to still support depreacted routines but not if built with
"no-depracted". .

This commit will define some of the needed defines if ther are not
defined by OpenSSL. Thus if a distro builds OpenSSL with "no-depracted"
it can still be used.

 On branch fix-1755
 Changes to be committed:
	modified:   src/libopensc/sc-ossl-compat.h
2019-07-31 20:12:22 +02:00