mirror of
https://github.com/intel/linux-sgx
synced 2026-06-08 14:49:32 +00:00
Linux 2.20 Open Source Gold Release
Supported the AEX (Asynchronous Enclave Exit) Notify feature. Supported Mbed-TLS Cryptography library (excluding SSL/TLS portion) in Enclave. Applied patches to OpenSSL 1.1.1t, fixed CVE-2023-1255, CVE-2023-0465 and CVE-2023-0466. Upgraded to Intel(R) Integrated Performance Primitives (IPP) Cryptography library version 2021.7. Upgraded Intel SGX Quote Verification Enclave to integrate updated SgxSSL. Enhanced the attestation local cache functionality by giving users the option to provide their own cache file. Enabled QPL/QCNL log in DCAP samples. Fixed bugs. Signed-off-by: Li, Xun <xun.li@intel.com>
This commit is contained in:
@@ -53,20 +53,20 @@ int get_pkey_by_rsa(EVP_PKEY *pk)
|
||||
e = BN_new();
|
||||
if (!e) {
|
||||
PRINT("BN_new failed\n");
|
||||
return res;
|
||||
goto done;
|
||||
}
|
||||
|
||||
res = BN_set_word(e, (BN_ULONG)RSA_F4);
|
||||
if (!res) {
|
||||
PRINT("BN_set_word failed (%d)\n", res);
|
||||
return res;
|
||||
goto done;
|
||||
}
|
||||
|
||||
rsa = RSA_new();
|
||||
if (!rsa) {
|
||||
PRINT("RSA_new failed\n");
|
||||
res = -1;
|
||||
return res;
|
||||
goto done;
|
||||
}
|
||||
|
||||
res = RSA_generate_key_ex(
|
||||
@@ -79,12 +79,15 @@ int get_pkey_by_rsa(EVP_PKEY *pk)
|
||||
if (!res)
|
||||
{
|
||||
PRINT("RSA_generate_key failed (%d)\n", res);
|
||||
return res;
|
||||
goto done;
|
||||
}
|
||||
|
||||
// Assign RSA key to EVP_PKEY structure
|
||||
EVP_PKEY_assign_RSA(pk, rsa);
|
||||
|
||||
done:
|
||||
if (e)
|
||||
BN_clear_free(e);
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -100,14 +103,14 @@ int get_pkey_by_ec(EVP_PKEY *pk)
|
||||
if (res <= 0)
|
||||
{
|
||||
PRINT("EC_generate_key failed (%d)\n", res);
|
||||
return res;
|
||||
goto done;
|
||||
}
|
||||
|
||||
res = EVP_PKEY_CTX_set_ec_paramgen_curve_nid(ctx, NID_secp384r1);
|
||||
if (res <= 0)
|
||||
{
|
||||
PRINT("EC_generate_key failed (%d)\n", res);
|
||||
return res;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Generate key */
|
||||
@@ -115,9 +118,13 @@ int get_pkey_by_ec(EVP_PKEY *pk)
|
||||
if (res <= 0)
|
||||
{
|
||||
PRINT("EC_generate_key failed (%d)\n", res);
|
||||
return res;
|
||||
goto done;
|
||||
}
|
||||
|
||||
done:
|
||||
if (ctx)
|
||||
EVP_PKEY_CTX_free(ctx);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user