diff options
author | Ayoub Zaki <ayoub.zaki@embetrix.com> | 2025-01-22 14:33:13 +0100 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2025-01-24 18:20:08 -0800 |
commit | 574755588bae1e6c68068220893adff4410b71e8 (patch) | |
tree | cbcc752019a0bf72d8988d47a0c5e044c38bd612 | |
parent | 9ba0679eee56641d14d275df5310a52bd9c229bc (diff) | |
download | meta-openembedded-574755588bae1e6c68068220893adff4410b71e8.tar.gz |
pkcs11-provider: Upgrade 0.5 -> 0.6
Changelogs:
- https://github.com/latchset/pkcs11-provider/releases/tag/v0.6
- https://github.com/latchset/pkcs11-provider/compare/v0.5...v0.6
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-oe/recipes-support/pkcs11-provider/pkcs11-provider/0001-Fix-types-for-old-32-bit-systems.patch | 49 | ||||
-rw-r--r-- | meta-oe/recipes-support/pkcs11-provider/pkcs11-provider/0001-meson-add-option-to-allow-override-default-default_p.patch | 53 | ||||
-rw-r--r-- | meta-oe/recipes-support/pkcs11-provider/pkcs11-provider_0.6.bb (renamed from meta-oe/recipes-support/pkcs11-provider/pkcs11-provider_0.5.bb) | 12 |
3 files changed, 62 insertions, 52 deletions
diff --git a/meta-oe/recipes-support/pkcs11-provider/pkcs11-provider/0001-Fix-types-for-old-32-bit-systems.patch b/meta-oe/recipes-support/pkcs11-provider/pkcs11-provider/0001-Fix-types-for-old-32-bit-systems.patch deleted file mode 100644 index 189a0e21b3..0000000000 --- a/meta-oe/recipes-support/pkcs11-provider/pkcs11-provider/0001-Fix-types-for-old-32-bit-systems.patch +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | From 088f038de633b5de777fb0f95cd9598f320151f6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Simo Sorce <simo@redhat.com> | ||
3 | Date: Wed, 5 Jun 2024 11:22:35 -0400 | ||
4 | Subject: [PATCH] Fix types for old 32 bit systems | ||
5 | |||
6 | On x86 CK_ULONG and size_t have different sizes, ensure we use | ||
7 | compatible types on our helper functions. | ||
8 | |||
9 | Signed-off-by: Simo Sorce <simo@redhat.com> | ||
10 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
11 | --- | ||
12 | Upstream-Status: Backport [https://github.com/latchset/pkcs11-provider/commit/9fa16b7fd398b62f06cb10892fe93dc574d67399] | ||
13 | |||
14 | src/asymmetric_cipher.c | 4 ++-- | ||
15 | src/util.h | 2 +- | ||
16 | 2 files changed, 3 insertions(+), 3 deletions(-) | ||
17 | |||
18 | diff --git a/src/asymmetric_cipher.c b/src/asymmetric_cipher.c | ||
19 | index 4d87b1c..3256fd2 100644 | ||
20 | --- a/src/asymmetric_cipher.c | ||
21 | +++ b/src/asymmetric_cipher.c | ||
22 | @@ -251,12 +251,12 @@ static int p11prov_rsaenc_decrypt_init(void *ctx, void *provkey, | ||
23 | static int | ||
24 | p11prov_tls_constant_time_depadding(struct p11prov_rsaenc_ctx *encctx, | ||
25 | unsigned char *out, unsigned char *buf, | ||
26 | - size_t *out_size, CK_ULONG *ret_cond) | ||
27 | + CK_ULONG *out_size, CK_ULONG *ret_cond) | ||
28 | { | ||
29 | unsigned char randbuf[SSL_MAX_MASTER_KEY_LENGTH]; | ||
30 | CK_ULONG ver_cond = 0; | ||
31 | CK_ULONG cond = 0; | ||
32 | - size_t length = SSL_MAX_MASTER_KEY_LENGTH; | ||
33 | + CK_ULONG length = SSL_MAX_MASTER_KEY_LENGTH; | ||
34 | int err; | ||
35 | |||
36 | /* always generate a random buffer, to constant_time swap in | ||
37 | diff --git a/src/util.h b/src/util.h | ||
38 | index bcbc2db..1b24666 100644 | ||
39 | --- a/src/util.h | ||
40 | +++ b/src/util.h | ||
41 | @@ -120,7 +120,7 @@ static inline int constant_select_int(CK_ULONG cond, int a, int b) | ||
42 | return (int)((A & mask) | (B & ~mask)); | ||
43 | } | ||
44 | |||
45 | -static inline void constant_select_buf(CK_ULONG cond, size_t size, | ||
46 | +static inline void constant_select_buf(CK_ULONG cond, CK_ULONG size, | ||
47 | unsigned char *dst, unsigned char *a, | ||
48 | unsigned char *b) | ||
49 | { | ||
diff --git a/meta-oe/recipes-support/pkcs11-provider/pkcs11-provider/0001-meson-add-option-to-allow-override-default-default_p.patch b/meta-oe/recipes-support/pkcs11-provider/pkcs11-provider/0001-meson-add-option-to-allow-override-default-default_p.patch new file mode 100644 index 0000000000..5181862f0c --- /dev/null +++ b/meta-oe/recipes-support/pkcs11-provider/pkcs11-provider/0001-meson-add-option-to-allow-override-default-default_p.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From 5031b867f5406f14b23ed01f4d68bc9acb073491 Mon Sep 17 00:00:00 2001 | ||
2 | From: Ayoub Zaki <ayoub.zaki@embetrix.com> | ||
3 | Date: Wed, 22 Jan 2025 13:36:36 +0100 | ||
4 | Subject: [PATCH] meson: add option to allow override default | ||
5 | default_pkcs11_module | ||
6 | |||
7 | Upstream-Status: Submitted [https://github.com/latchset/pkcs11-provider/pull/511] | ||
8 | Signed-off-by: Ayoub Zaki <ayoub.zaki@embetrix.com> | ||
9 | --- | ||
10 | meson.build | 11 ++++++++--- | ||
11 | meson_options.txt | 6 ++++++ | ||
12 | 2 files changed, 14 insertions(+), 3 deletions(-) | ||
13 | |||
14 | diff --git a/meson.build b/meson.build | ||
15 | index b3912cb..e7cf2d3 100644 | ||
16 | --- a/meson.build | ||
17 | +++ b/meson.build | ||
18 | @@ -67,10 +67,15 @@ if host_machine.endian() == 'big' | ||
19 | endif | ||
20 | |||
21 | p11_kit = dependency('p11-kit-1', required: false) | ||
22 | -if p11_kit.found() | ||
23 | - default_pkcs11_module = p11_kit.get_variable(pkgconfig: 'proxy_module') | ||
24 | - conf.set_quoted('DEFAULT_PKCS11_MODULE', default_pkcs11_module) | ||
25 | +default_pkcs11_module = get_option('default_pkcs11_module') | ||
26 | +if default_pkcs11_module == 'no' | ||
27 | + if p11_kit.found() | ||
28 | + default_pkcs11_module = p11_kit.get_variable(pkgconfig: 'proxy_module') | ||
29 | + else | ||
30 | + error('default_pkcs11_module is empty') | ||
31 | + endif | ||
32 | endif | ||
33 | +conf.set_quoted('DEFAULT_PKCS11_MODULE', default_pkcs11_module) | ||
34 | |||
35 | headers = [ | ||
36 | 'dlfcn.h', | ||
37 | diff --git a/meson_options.txt b/meson_options.txt | ||
38 | index 7e7b9be..1306639 100644 | ||
39 | --- a/meson_options.txt | ||
40 | +++ b/meson_options.txt | ||
41 | @@ -2,3 +2,9 @@ option('preload_libasan', | ||
42 | type: 'string', | ||
43 | value: 'no', | ||
44 | description: 'Path to libasan.so to preload') | ||
45 | + | ||
46 | + | ||
47 | +option('default_pkcs11_module', | ||
48 | + type : 'string', | ||
49 | + value : 'no', | ||
50 | + description : 'Path to the default PKCS11 module') | ||
51 | -- | ||
52 | 2.43.0 | ||
53 | |||
diff --git a/meta-oe/recipes-support/pkcs11-provider/pkcs11-provider_0.5.bb b/meta-oe/recipes-support/pkcs11-provider/pkcs11-provider_0.6.bb index fcd8fe631e..1644335415 100644 --- a/meta-oe/recipes-support/pkcs11-provider/pkcs11-provider_0.5.bb +++ b/meta-oe/recipes-support/pkcs11-provider/pkcs11-provider_0.6.bb | |||
@@ -10,16 +10,22 @@ HOMEPAGE = "https://github.com/latchset/pkcs11-provider" | |||
10 | SECTION = "libs" | 10 | SECTION = "libs" |
11 | LICENSE = "Apache-2.0" | 11 | LICENSE = "Apache-2.0" |
12 | LIC_FILES_CHKSUM = "file://COPYING;md5=b53b787444a60266932bd270d1cf2d45" | 12 | LIC_FILES_CHKSUM = "file://COPYING;md5=b53b787444a60266932bd270d1cf2d45" |
13 | DEPENDS = "openssl" | 13 | DEPENDS = "\ |
14 | openssl \ | ||
15 | p11-kit \ | ||
16 | " | ||
14 | 17 | ||
15 | SRCREV = "3a4fdd2a2e5643af2a0f857b66a19b9fa109d40f" | 18 | SRCREV = "93bd41c505cf54dc1ecef6c963df347b9f4abf6d" |
16 | 19 | ||
17 | SRC_URI = "git://github.com/latchset/${BPN}.git;branch=main;protocol=https \ | 20 | SRC_URI = "git://github.com/latchset/${BPN}.git;branch=main;protocol=https \ |
18 | file://0001-Fix-types-for-old-32-bit-systems.patch \ | 21 | file://0001-meson-add-option-to-allow-override-default-default_p.patch \ |
19 | " | 22 | " |
20 | 23 | ||
21 | S = "${WORKDIR}/git" | 24 | S = "${WORKDIR}/git" |
22 | 25 | ||
23 | inherit meson pkgconfig | 26 | inherit meson pkgconfig |
24 | 27 | ||
28 | # Overwrite default pkcs11 module path | ||
29 | #EXTRA_OEMESON += "-Ddefault_pkcs11_module=/path/to/mymodule.so" | ||
30 | |||
25 | FILES:${PN} += "${libdir}/ossl-modules/pkcs11.so" | 31 | FILES:${PN} += "${libdir}/ossl-modules/pkcs11.so" |