From: "Li, Yi" <yi1.li@intel.com>
To: devel@edk2.groups.io
Cc: Yi Li <yi1.li@intel.com>
Subject: [edk2-staging/OpenSSL11_EOL][PATCH 2/4] CryptoPkg: sync latest change in uefiprov to minprov
Date: Tue, 4 Apr 2023 17:54:31 +0800 [thread overview]
Message-ID: <d2793e2acabc9cb85d2c996e8d1dbd39cdbe0242.1680601312.git.yi1.li@intel.com> (raw)
In-Reply-To: <cover.1680601312.git.yi1.li@intel.com>
Signed-off-by: Yi Li <yi1.li@intel.com>
---
.../Library/OpensslLib/OpensslStub/minprov.c | 30 +++++--------------
1 file changed, 7 insertions(+), 23 deletions(-)
diff --git a/CryptoPkg/Library/OpensslLib/OpensslStub/minprov.c b/CryptoPkg/Library/OpensslLib/OpensslStub/minprov.c
index 1ba4b4f669..26fad90408 100644
--- a/CryptoPkg/Library/OpensslLib/OpensslStub/minprov.c
+++ b/CryptoPkg/Library/OpensslLib/OpensslStub/minprov.c
@@ -1,7 +1,5 @@
/** @file
- Minimal UEFI Openssl provider implementation, only support PEI crypto feature
- without PKCS7.
-
+ Minimal UEFI Openssl provider implementation, only support PEI crypto feature.
Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -122,7 +120,6 @@ static const OSSL_ALGORITHM deflt_digests[] = {
// { PROV_NAMES_MD5_SHA1, "provider=default", ossl_md5_sha1_functions },
#endif /* OPENSSL_NO_MD5 */
-
{ PROV_NAMES_NULL, "provider=default", ossl_nullmd_functions },
{ NULL, NULL, NULL }
};
@@ -165,16 +162,7 @@ static const OSSL_ALGORITHM deflt_rands[] = {
{ NULL, NULL, NULL }
};
-static const OSSL_ALGORITHM deflt_signature[] = {
- { PROV_NAMES_RSA, "provider=default", ossl_rsa_signature_functions },
- { NULL, NULL, NULL }
-};
-
static const OSSL_ALGORITHM deflt_keymgmt[] = {
- { PROV_NAMES_RSA, "provider=default", ossl_rsa_keymgmt_functions,
- PROV_DESCS_RSA },
- { PROV_NAMES_RSA_PSS, "provider=default", ossl_rsapss_keymgmt_functions,
- PROV_DESCS_RSA_PSS },
{ PROV_NAMES_HKDF, "provider=default", ossl_kdf_keymgmt_functions,
PROV_DESCS_HKDF_SIGN },
{ NULL, NULL, NULL }
@@ -189,16 +177,16 @@ static const OSSL_ALGORITHM *deflt_query(void *provctx, int operation_id,
return deflt_digests;
case OSSL_OP_CIPHER:
return exported_ciphers;
- case OSSL_OP_RAND:
- return deflt_rands;
case OSSL_OP_MAC:
return deflt_macs;
case OSSL_OP_KDF:
return deflt_kdfs;
- case OSSL_OP_KEYEXCH:
- return deflt_keyexch;
+ case OSSL_OP_RAND:
+ return deflt_rands;
case OSSL_OP_KEYMGMT:
return deflt_keymgmt;
+ case OSSL_OP_KEYEXCH:
+ return deflt_keyexch;
}
return NULL;
}
@@ -229,10 +217,8 @@ int ossl_uefi_provider_init(const OSSL_CORE_HANDLE *handle,
void **provctx)
{
OSSL_FUNC_core_get_libctx_fn *c_get_libctx = NULL;
- BIO_METHOD *corebiometh;
- if (!ossl_prov_bio_from_dispatch(in)
- || !ossl_prov_seeding_from_dispatch(in))
+ if (!ossl_prov_seeding_from_dispatch(in))
return 0;
for (; in->function_id != 0; in++) {
switch (in->function_id) {
@@ -262,8 +248,7 @@ int ossl_uefi_provider_init(const OSSL_CORE_HANDLE *handle,
* This only works for built-in providers. Most providers should
* create their own library context.
*/
- if ((*provctx = ossl_prov_ctx_new()) == NULL
- || (corebiometh = ossl_bio_prov_init_bio_method()) == NULL) {
+ if ((*provctx = ossl_prov_ctx_new()) == NULL) {
ossl_prov_ctx_free(*provctx);
*provctx = NULL;
return 0;
@@ -271,7 +256,6 @@ int ossl_uefi_provider_init(const OSSL_CORE_HANDLE *handle,
ossl_prov_ctx_set0_libctx(*provctx,
(OSSL_LIB_CTX *)c_get_libctx(handle));
ossl_prov_ctx_set0_handle(*provctx, handle);
- ossl_prov_ctx_set0_core_bio_method(*provctx, corebiometh);
*out = deflt_dispatch_table;
ossl_prov_cache_exported_algorithms(deflt_ciphers, exported_ciphers);
--
2.31.1.windows.1
next prev parent reply other threads:[~2023-04-04 9:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-04 9:54 [edk2-staging/OpenSSL11_EOL][PATCH 0/4] Openssl 3.0 POC update Apr 4 Li, Yi
2023-04-04 9:54 ` [edk2-staging/OpenSSL11_EOL][PATCH 1/4] CryptoPkg: disabled ssl server Li, Yi
2023-04-04 9:54 ` Li, Yi [this message]
2023-04-04 9:54 ` [edk2-staging/OpenSSL11_EOL][PATCH 3/4] Readme: 0330 update Li, Yi
2023-04-04 9:54 ` [edk2-staging/OpenSSL11_EOL][PATCH 4/4] Readme: update POC result and next step Li, Yi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d2793e2acabc9cb85d2c996e8d1dbd39cdbe0242.1680601312.git.yi1.li@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox