diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-09-23 17:30:18 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-09-23 17:30:18 +0100 |
commit | 0e7ef53ddcc33809bcb2644d3649617113b78ea3 (patch) | |
tree | f1665ac62e9addb6b2c3663e7f7507b84c82a43e /dev-libs/openpace/files | |
parent | 55a7866dd6169a108d3a9e8d6696a970dea8a0b6 (diff) |
gentoo auto-resync : 23:09:2022 - 17:30:17
Diffstat (limited to 'dev-libs/openpace/files')
-rw-r--r-- | dev-libs/openpace/files/openpace-1.1.2-openssl-3.0.patch | 76 | ||||
-rw-r--r-- | dev-libs/openpace/files/openpace-1.1.2-openssl.patch | 25 |
2 files changed, 101 insertions, 0 deletions
diff --git a/dev-libs/openpace/files/openpace-1.1.2-openssl-3.0.patch b/dev-libs/openpace/files/openpace-1.1.2-openssl-3.0.patch new file mode 100644 index 000000000000..d2ac244a1a7d --- /dev/null +++ b/dev-libs/openpace/files/openpace-1.1.2-openssl-3.0.patch @@ -0,0 +1,76 @@ +From 2d94a152dd36543d2a713f1abe20717fdaafae0a Mon Sep 17 00:00:00 2001 +From: Frank Morgner <frankmorgner@gmail.com> +Date: Sat, 18 Dec 2021 00:15:04 +0100 +Subject: [PATCH] added basic compatibility with OpenSSL 3.0 + +deprecated warnings are not handled for now + +fixes https://github.com/frankmorgner/openpace/issues/53 +--- + src/eac/cv_cert.h | 6 +++++- + src/eac_util.c | 14 ++++++++++++++ + 2 files changed, 19 insertions(+), 1 deletion(-) + +diff --git a/src/eac/cv_cert.h b/src/eac/cv_cert.h +index f8c6565..595eb9c 100644 +--- a/src/eac/cv_cert.h ++++ b/src/eac/cv_cert.h +@@ -341,7 +341,11 @@ CVC_CERT *CVC_d2i_CVC_CERT(CVC_CERT **cert, const unsigned char **in, long len); + * @return Number of bytes successfully encoded or a negative value if an + * error occured. + */ +-int i2d_CVC_CERT(CVC_CERT *a, unsigned char **out); ++int i2d_CVC_CERT( ++#if OPENSSL_VERSION_NUMBER >= 0x30000000L ++ const ++#endif ++ CVC_CERT *a, unsigned char **out); + + /** + * @brief Duplicate a CV certificate +diff --git a/src/eac_util.c b/src/eac_util.c +index e87293c..6e518e0 100644 +--- a/src/eac_util.c ++++ b/src/eac_util.c +@@ -321,6 +321,8 @@ randb(int numbytes) + return NULL; + } + ++#include <openssl/provider.h> ++ + BUF_MEM * + retail_mac_des(const BUF_MEM * key, const BUF_MEM * in) + { +@@ -331,6 +333,11 @@ retail_mac_des(const BUF_MEM * key, const BUF_MEM * in) + + check(key, "Invalid arguments"); + ++#if OPENSSL_VERSION_NUMBER >= 0x30000000L ++ OSSL_PROVIDER *legacy; ++ legacy = OSSL_PROVIDER_load(NULL, "legacy"); ++#endif ++ + len = EVP_CIPHER_block_size(EVP_des_cbc()); + check(key->length >= 2*len, "Key too short"); + +@@ -369,6 +376,9 @@ retail_mac_des(const BUF_MEM * key, const BUF_MEM * in) + BUF_MEM_free(c_tmp); + BUF_MEM_free(d_tmp); + EVP_CIPHER_CTX_free(ctx); ++#if OPENSSL_VERSION_NUMBER >= 0x30000000L ++ OSSL_PROVIDER_unload(legacy); ++#endif + + return mac; + +@@ -381,6 +391,10 @@ retail_mac_des(const BUF_MEM * key, const BUF_MEM * in) + BUF_MEM_free(d_tmp); + if (ctx) + EVP_CIPHER_CTX_free(ctx); ++#if OPENSSL_VERSION_NUMBER >= 0x30000000L ++ if (legacy) ++ OSSL_PROVIDER_unload(legacy); ++#endif + + return NULL; + } diff --git a/dev-libs/openpace/files/openpace-1.1.2-openssl.patch b/dev-libs/openpace/files/openpace-1.1.2-openssl.patch new file mode 100644 index 000000000000..8802c2528f18 --- /dev/null +++ b/dev-libs/openpace/files/openpace-1.1.2-openssl.patch @@ -0,0 +1,25 @@ +From 8b2c8a76873da4862dbf4240c901f3e6d4bc040a Mon Sep 17 00:00:00 2001 +From: Frank Morgner <frankmorgner@gmail.com> +Date: Sat, 18 Dec 2021 00:15:39 +0100 +Subject: [PATCH] fixed outdated API usage of BN_zero + +returns void since 0.9.8 +--- + src/eac.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/eac.c b/src/eac.c +index ea84253..9dccd79 100644 +--- a/src/eac.c ++++ b/src/eac.c +@@ -105,7 +105,9 @@ int EAC_reset_ssc(const EAC_CTX *ctx) + if (!ctx) + return 0; + +- return BN_zero(ctx->ssc); ++ BN_zero(ctx->ssc); ++ ++ return 1; + } + + int EAC_set_ssc(const EAC_CTX *ctx, unsigned long ssc) |