34 Commits

Author SHA1 Message Date
Alexander Kanavin
fc78d37ff0
meta-openembedded/all: adapt to UNPACKDIR changes
Please see
https://git.yoctoproject.org/poky/commit/?id=4dd321f8b83afecd962393101b2a6861275b5265
for what changes are needed, and sed commands that can be used to make them en masse.

I've verified that bitbake -c patch world works with these, but did not run a world
build; the majority of recipes shouldn't need further fixups, but if there are
some that still fall out, they can be fixed in followups.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-06-25 06:44:52 -07:00
Wang Mingyu
54df7d1fb9
opensc: upgrade 0.26.0 -> 0.26.1
Changelog:
==========
## General improvements
* Align allocations of sc_mem_secure_alloc
* Fix -O3 gcc optimization failure on amd64 and ppc64el

## pkcs11-spy
* Avoid crash while spying C_GetInterface()

## TCOS
* Fix reading certificate

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-01-24 18:20:01 -08:00
Peter Marko
2a432397cd
opensc: mark CVE-2024-8443 as fixed
NVD tracks this CVE as version-less.
Per [1] this is fixed by following commits:

$ git tag --contains b28a3cef416fcfb92fbb9ea7fd3c71df52c6c9fc
0.26.0
0.26.0-rc1
$ git tag --contains 02e847458369c08421fd2d5e9a16a5f272c2de9e
0.26.0
0.26.0-rc1

[1] https://github.com/OpenSC/OpenSC/wiki/CVE-2024-8443

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-12-20 19:47:55 -08:00
Peter Marko
0b3e7c1fd6
opensc: upgrade 0.25.1 -> 0.26.0
Solves CVE-2024-45615, CVE-2024-45616, CVE-2024-45617, CVE-2024-45618,
CVE-2024-45619 and CVE-2024-45620.

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-12-20 19:47:55 -08:00
Niko Mauno
990955ba09
opensc: Cosmetic fixes
Apply some suggestions from oe-stylize.py and sort configure options
alphabetically, and remove stale version comment line which has not
been updated for some time.

Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-08-21 08:47:07 -07:00
Niko Mauno
cef49b830f
opensc: Fix LICENSE declaration
According to https://github.com/OpenSC/OpenSC/wiki#license OpenSC is
licensed under LGPL-2.1 or later, which seems to be affirmed also by
the comments in the source code files, as well as the COPYING file.

Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-08-21 08:47:06 -07:00
Niko Mauno
f70274aa2b
opensc: Drop virtual/libiconv from DEPENDS
According to
https://github.com/OpenSC/OpenSC/blob/0.25.1/NEWS#L1124-L1125
since version 0.12.0 the iconv dependency has been removed.

Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-08-21 08:47:06 -07:00
Niko Mauno
c066a6ff83
opensc: Add 'readline' PACKAGECONFIG option
This helps us to also get rid of associated RDEPENDS declaration which
implicitly pulled readline to rootfs, even configure resolved readline
as not enabled.

Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-08-21 08:47:06 -07:00
Niko Mauno
dac59629e9
opensc: Amend FILES:${PN} declaration
Commit da68f807bd718fb848acc792fd9326df719e0880 added the symlink .so
path to FILES:${PN}-dev to fix QA error, complement the operation by
removing identical line from FILES:${PN}

Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-08-21 08:47:06 -07:00
Wang Mingyu
89af1300cf
opensc: upgrade 0.25.0 -> 0.25.1
Changelog:
============
* Add missing file to dist tarball to build documentation
* Fix RSA decryption with PKCS#1 v1.5 padding
* Fix crash when app is not set

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-04-17 23:47:24 -07:00
Wang Mingyu
fc996b1928
opensc: upgrade 0.24.0 -> 0.25.0
Changelog:
============
## Security
* [CVE-2023-5992]: Side-channel leaks while stripping encryption PKCS#1.5 padding in OpenSC
* [CVE-2024-1454]: Potential use-after-free in AuthentIC driver during card enrollment in pkcs15init

## General improvements
* Update OpenSSL 1.1.1 to 3.0 in MacOS build
* Remove support for old card drivers Akis, GPK, Incrypto34 and Westcos, disable Cyberflex driver
* Fix 64b to 32b conversions
* Improvements for the p11test
* Fix reader initialization without SCardControl
* Make RSA PKCS#1 v1.5 depadding constant-time
* Add option for disabling PKCS#1 v1.5 depadding (type 01 and 02) on the card
* Enable MSI signing via Signpath CI integration for Windows
* Fixed various issues reported by OSS-Fuzz and Coverity in drivers

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-03-20 09:28:06 -07:00
alperak
da68f807bd
opensc: upgrade 0.23.0 -> 0.24.0
* All patches dropped because fixed in the new version.

0001-pkcs11-tool-Fix-private-key-import.patch -> https://github.com/OpenSC/OpenSC/blob/0.24.0/src/tools/pkcs11-tool.c#L3710
0002-pkcs11-tool-Log-more-information-on-OpenSSL-errors.patch -> https://github.com/OpenSC/OpenSC/blob/0.24.0/src/tools/pkcs11-tool.c#L3686
CVE-2023-2977.patch -> 81944d1529

* Fix -> ERROR: opensc-0.24.0-r0 do_package_qa: QA Issue: non -dev/-dbg/nativesdk- package opensc contains symlink .so '/usr/lib/onepin-opensc-pkcs11.so' [dev-so]

Changelog:

* CVE-2023-40660: Fix Potential PIN bypass (#2806, frankmorgner/OpenSCToken#50, #2807)
* CVE-2023-40661: Important dynamic analyzers reports
* CVE-2023-4535: Out-of-bounds read in MyEID driver handling encryption using symmetric keys (f1993dc4)
* Fix compatibility of EAC with OpenSSL 3.0 (#2674)
* Enable `use_file_cache` by default (#2501)
* Use custom libctx with OpenSSL >= 3.0 (#2712, #2715)
* Fix record-based files (#2604)
* Fix several race conditions (#2735)
* Run tests under Valgrind (#2756)
* Test signing of data bigger than 512 bytes (#2789)
* Update to OpenPACE 1.1.3 (#2796)
* Implement logout for some of the card drivers (#2807)
* Fix wrong popup position of opensc-notify (#2901)
* Fixed various issues reported by OSS-Fuzz and Coverity regarding card drivers, PKCS#11 and PKCS#15 init
* Check card presence state in `C_GetSessionInfo` (#2740)
* Remove `onepin-opensc-pkcs11` module (#2681)
* Do not use colons in the token info label (#2760)
* Present profile objects in all slots with the CKA_TOKEN attribute to resolve issues with NSS (#2928, #2924)
* Use secure memory for PUK (#2906)
* Don't logout to preserve concurrent access from different processes (#2907)
* Add more examples to manual page (#2936)
* Present profile objects in all virtual slots (#2928)
* Provide CKA_TOKEN attribute for profile objects (#2924)
* Improve --slot parameter documentation (#2951)
* Honor cache offsets when writing file cache (#2858)
* Prevent needless amount of PIN prompts from pkcs15init layer (#2916)
* Propagate CKA_EXTRACTABLE and SC_PKCS15_PRKEY_ACCESS_SENSITIVE from and back to PKCS#11 (#2936)
* Fix for private keys that do not need a PIN (#2722)
* Unbreak decipher when the first null byte of PKCS#1.5 padding is missing (#2939)
* Fix RSA key import with OpenSSL 3.0 (#2656)
* Add support for attribute filtering when listing objects (#2687)
* Add support for `--private` flag when writing certificates (#2768)
* Add support for non-AEAD ciphers to the test mode (#2780)
* Show CKA_SIGN attribute for secret keys (#2862)
* Do not attempt to read CKA_ALWAYS_AUTHENTICATE on secret keys (#2864, #2913)
* Show Sign/VerifyRecover attributes (#2888)
* Add option to import generic keys (#2955)
* Generate 2k RSA keys by default (b53fc5cd)
* Disable autostart on Linux by default (#2680)
* Add support for IDPrime MD 830, 930 and 940 (#2666)
* Add support for SafeNet eToken 5110 token (#2812)
* Process index even without keyrefmap and use correct label for second PIN (#2878)
* Add support for Gemalto IDPrime 940C (#2941)
* Change of PIN requires verification of the PIN (#2759)
* Fix incorrect CMAC computation for subkeys (#2759, issue #2734)
* Use true random number for mutual authentication for SM (#2766)
* Add verification of data coming from the token in the secure messaging mode (#2772)
* Avoid success when using unsupported digest and fix data length for RAW ECDSA signatures (#2845)
* Fix select data command (#2753, issue #2752)
* Unbreak ed/curve25519 support (#2892)
* Add support for Slovenian eID card (eOI) (#2646)
* Add support for IDEMIA (Oberthur) tokens (#2483)
* Add support for Swissbit iShield FIDO2 Authenticator (#2671)
* Implement PIV secure messaging (#2053)
* Add support for Slovak eID cards (#2672)
* Support ECDSA with off-card hashing (#2642)
* Fix WRAP operation when using T0 (#2695)
* Identify changes on the card and enable `use_file_cache` (#2798)
* Workaround for unwrapping using 2K RSA key (#2921)
* Add support for `opensc-tool --serial` (#2675)
* Fix unwrapping of 4096 keys with handling reader limits (#2682)
* Indicate supported hashes and MGF1s (#2827)

Signed-off-by: alperak <alperyasinak1@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-01-08 19:54:38 -08:00
Lee Chee Yang
44b0037309 opensc: fix CVE-2023-2977
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-09-22 07:36:16 -07:00
Jan Luebbe
cc5082d5d1 opensc: fix private key import
Importing private keys into a PKCS#11 token is broken with OpenSC 0.23.0
and OpenSSL 3. Fix it by backporting the corresponding upstream fixes.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-02-02 10:25:33 -08:00
Jan Luebbe
c3e6365aea opensc: fix homepage URL
The opensc-project.org domain has not been active for a long time [1],
so use the current wiki (which is also linked from the projects GitHub
landing page).

[1] https://opensc-devel.narkive.com/48b09iig/www-opensc-project-org

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-01-25 08:57:42 -08:00
Wang Mingyu
918739de58 opensc: upgrade 0.22.0 -> 0.23.0
Changelog:
============
 Support signing of data with a length of more than 512 bytes (#2314)
 By default, disable support for old card drivers (#2391) and remove support for old drivers MioCOS and JCOP (#2374)
 Bump minimal required OpenSSL version to 1.1.1 and add support for OpenSSL 3.0 (#2438, #2506)
 Compatibility with LibreSSL (#2495, #2595)
 Remove support for DSA (#2503)
 Extend p11test to support symmetric keys (#2430)
 Notice detached reader on macOS (#2418)
 Support for OAEP padding (#2475, #2484)
 Fix for PSS salt length (#2478)
 Improve fuzzing by adding new tests (#2417, #2500, #2520, #2550, #2637)
 Fixed various issues reported by OSS-Fuzz and Coverity regarding card drivers, PKCS#11 and PKCS#15 init
 Fix issues with OpenPACE (#2472)
 Containers support for local testing
 Add support for encryption and decryption using symmetric keys (#2473, #2607)
 Stop building support for Gost algorithms with OpenSSL 3.0 as they require deprecated API (#2586)
 Fix detection of disconnected readers in PCSC (#2600)
 Add configuration option for on-disk caching of private data (#2588)
 Skip building empty binaries when dependencies are missing and remove needless linking (#2617)
 Define arm64 as a supported architecture in the Installer package (#2610)

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-12-05 09:16:24 -08:00
Khem Raj
14c7d8a0d7 recipes: Update LICENSE variable to use SPDX license identifiers
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-03-04 17:41:45 -08:00
Richard Purdie
b402a3076f recipes: Update SRC_URI branch and protocols
This patch updates SRC_URIs using git to include branch=master if no branch is set
and also to use protocol=https for github urls as generated by the conversion script
in OE-Core.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-11-03 06:57:49 -07:00
Alexander Kanavin
c61044d58e opensc: do not use -Werror
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-10-14 07:16:58 -07:00
wangmy
6a0c9ea9d3 opensc: upgrade 0.21.0 -> 0.22.0
Use standard paths for file cache on Linux and OSX
Various issues of memory/buffer handling in legacy drivers mostly
reported by oss-fuzz and coverity (tcos, oberthur, isoapplet, iasecc,
westcos, gpk, flex, dnie, mcrd, authentic, belpic)
Add threading test to pkcs11-tool
Add support to generate generic secret keys
opensc-explorer: Print information about LCS (Life cycle status byte)
Add support for Apple's arm64 (M1) binaries, removed TokenD.
A seperate installer with TokenD (and without arm64 binaries) will be available.
Support for gcc11 and its new strict aliasing rules
Initial support for building with OpenSSL 3.0
pkcs15-tool: Write data objects in binary mode
Avoid limited size of log messages

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-08-23 22:00:39 -07:00
Martin Jansa
c61dc077bb Convert to new override syntax
This is the result of automated script (0.9.1) conversion:

oe-core/scripts/contrib/convert-overrides.py .

converting the metadata to use ":" as the override character instead of "_".

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2021-08-03 10:21:25 -07:00
Zheng Ruoqin
c3f59819a7 opensc: Fix the wrong version number.
The corresponding version number of commit 30180986a08cf71fe4af4b50251a8bb5b1ab95af is 0.21.0.

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-01-12 00:54:53 -08:00
Zang Ruochen
1df71a454c opensc: upgrade 0.20.0 -> 0.20.1
-License-Update: The address is updated as follows
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-12-03 22:32:56 -08:00
Khem Raj
8bb1fabfc5 opensc: Upgrade to 0.20.0
Drop all patches as they are already included in 0.20.0 release

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-01-17 15:44:06 -08:00
Khem Raj
bbb5732a4f opensc: Fix misaligned indentation
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-12-28 00:11:47 -08:00
Laurent Bonnans
40b3a51231 opensc: fix RDEPENDS in pcsc PACKAGECONFIG
OpenSC depends on pcsc-lite's systemd service and pkcs11 library at
runtime.

Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-12-05 23:01:06 -08:00
Jan Luebbe
8edd760e66 opensc: add support for native builds
This is needed as a dependency when using SoftHSM from the PKCS#11
OpenSSL engine for code singing.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-11-22 09:22:47 -08:00
Jan Luebbe
060ad325b6 opensc: use pcsc-lite instead of openct by default
OpenCT upstream maintenance seems to have stopped and OpenSC upstream
uses pcsc-lite by default in their configure script. Add PACKAGECONFIGs
for each and select pcsc by default.

As the openct package depends on pcsc-lite by itself, this avoids an
unnecessary package in the default case.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-11-22 09:22:47 -08:00
Khem Raj
c011beeaa6 opensc: Upgrade to 0.19.0
Switch fetcher to use github
Add patch to build with gcc9
Remove upstreamed patch
Inherit bash-completion

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-12-18 22:15:59 -08:00
Armin Kuster
c26b10b155 opensc: 0.18.0 version fix fetch error
ERROR: opensc-0.18.0-r0 do_fetch: Fetcher failure for URL: 'http://ftp.debian.org/debian/pool/main/o/opensc/opensc_0.18.0.orig.tar.gz'. Unable to fetch URL from any source.

This version is no longer hosted on the main debian URL so
use the archive URL

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-11-16 14:46:44 -08:00
Khem Raj
79d66aea14 opensc: Upgrade to 0.18.0
* Fixes build with OpenSSL 1.1.x
* Fix build with gcc8

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-09-08 13:32:12 -07:00
Derek Straka
7d12dd413f opensc: update to version 0.16.0
Signed-off-by: Derek Straka <derek@asterius.io>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-08-22 15:49:25 +02:00
Li xin
9d2fc54c80 opensc: upgrade 0.14.0 -> 0.15.0
Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2015-07-30 21:22:24 +02:00
Li xin
9b15b32690 opensc: add new recipe
OpenSC provides a set of libraries and utilities to work with smart cards.
Its main focus is on cards that support cryptographic operations, and
facilitate their use in security applications such as authentication,
mail encryption and digital signatures.

Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2015-02-12 19:37:20 +01:00