|
|
@ -251,231 +251,6 @@ diff -up openssl-3.0.0-beta1/crypto/evp/asymcipher.c.dual-abi openssl-3.0.0-beta
|
|
|
|
|
|
|
|
|
|
|
|
void EVP_ASYM_CIPHER_do_all_provided(OSSL_LIB_CTX *libctx,
|
|
|
|
void EVP_ASYM_CIPHER_do_all_provided(OSSL_LIB_CTX *libctx,
|
|
|
|
void (*fn)(EVP_ASYM_CIPHER *cipher,
|
|
|
|
void (*fn)(EVP_ASYM_CIPHER *cipher,
|
|
|
|
diff -up openssl-3.0.0-beta1/crypto/evp/evp_lib.c.dual-abi openssl-3.0.0-beta1/crypto/evp/evp_lib.c
|
|
|
|
|
|
|
|
--- openssl-3.0.0-beta1/crypto/evp/evp_lib.c.dual-abi 2021-07-13 01:10:08.970210463 +0200
|
|
|
|
|
|
|
|
+++ openssl-3.0.0-beta1/crypto/evp/evp_lib.c 2021-07-13 01:10:20.596324598 +0200
|
|
|
|
|
|
|
|
@@ -31,6 +31,21 @@
|
|
|
|
|
|
|
|
#include "crypto/asn1.h"
|
|
|
|
|
|
|
|
#include "internal/provider.h"
|
|
|
|
|
|
|
|
#include "evp_local.h"
|
|
|
|
|
|
|
|
+/* Macro machinery. */
|
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
+/* Defines OLD_STRING (a C string) as an alias for NEW_ID (a C
|
|
|
|
|
|
|
|
+ * identifier). The controlling C identifier symbol is ALIAS_ID (a C
|
|
|
|
|
|
|
|
+ * identifier). */
|
|
|
|
|
|
|
|
+#define RHEL_ALIAS3(alias_id, new_id, old_string) \
|
|
|
|
|
|
|
|
+ extern __typeof(new_id) alias_id \
|
|
|
|
|
|
|
|
+ __asm__ (old_string) \
|
|
|
|
|
|
|
|
+ __attribute__ ((__copy__ (new_id), __alias__ (#new_id)))
|
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
+/* Defines an alias using OLD_ID, which must be an macro identifier
|
|
|
|
|
|
|
|
+ * that expands to the new identifier. */
|
|
|
|
|
|
|
|
+#define RHEL_ALIAS1(old_id) \
|
|
|
|
|
|
|
|
+ RHEL_ALIAS3(RHEL_ALIAS_##old_id, old_id, #old_id)
|
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if !defined(FIPS_MODULE)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -337,6 +352,7 @@ int EVP_CIPHER_get_type(const EVP_CIPHER
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_type);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int evp_cipher_cache_constants(EVP_CIPHER *cipher)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
@@ -389,11 +405,13 @@ int EVP_CIPHER_get_block_size(const EVP_
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return cipher->block_size;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_block_size);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_CIPHER_CTX_get_block_size(const EVP_CIPHER_CTX *ctx)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return EVP_CIPHER_get_block_size(ctx->cipher);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_CTX_block_size);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_CIPHER_impl_ctx_size(const EVP_CIPHER *e)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
@@ -466,11 +484,13 @@ int EVP_CIPHER_CTX_is_encrypting(const E
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return ctx->encrypt;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_CTX_encrypting);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unsigned long EVP_CIPHER_get_flags(const EVP_CIPHER *cipher)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return cipher->flags;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_flags);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
@@ -501,6 +521,7 @@ int EVP_CIPHER_get_iv_length(const EVP_C
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return cipher->iv_len;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_iv_length);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_CIPHER_CTX_get_iv_length(const EVP_CIPHER_CTX *ctx)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
@@ -522,6 +543,7 @@ legacy:
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return len;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_CTX_iv_length);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_CIPHER_CTX_get_tag_length(const EVP_CIPHER_CTX *ctx)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
@@ -533,6 +555,7 @@ int EVP_CIPHER_CTX_get_tag_length(const
|
|
|
|
|
|
|
|
ret = evp_do_ciph_ctx_getparams(ctx->cipher, ctx->algctx, params);
|
|
|
|
|
|
|
|
return ret == 1 ? (int)v : 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_CTX_tag_length);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
|
|
|
|
|
|
|
const unsigned char *EVP_CIPHER_CTX_original_iv(const EVP_CIPHER_CTX *ctx)
|
|
|
|
|
|
|
|
@@ -615,6 +638,7 @@ int EVP_CIPHER_CTX_get_num(const EVP_CIP
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ok != 0 ? (int)v : EVP_CTRL_RET_UNSUPPORTED;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_CTX_num);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_CIPHER_CTX_set_num(EVP_CIPHER_CTX *ctx, int num)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
@@ -634,6 +658,7 @@ int EVP_CIPHER_get_key_length(const EVP_
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return cipher->key_len;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_key_length);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_CIPHER_CTX_get_key_length(const EVP_CIPHER_CTX *ctx)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
@@ -646,16 +671,19 @@ int EVP_CIPHER_CTX_get_key_length(const
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ok != 0 ? (int)v : EVP_CTRL_RET_UNSUPPORTED;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_CTX_key_length);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_CIPHER_get_nid(const EVP_CIPHER *cipher)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return cipher->nid;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_nid);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_CIPHER_CTX_get_nid(const EVP_CIPHER_CTX *ctx)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return ctx->cipher->nid;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_CTX_nid);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_CIPHER_is_a(const EVP_CIPHER *cipher, const char *name)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
@@ -679,6 +707,7 @@ const char *EVP_CIPHER_get0_name(const E
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_name);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const char *EVP_CIPHER_get0_description(const EVP_CIPHER *cipher)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
@@ -690,6 +719,7 @@ const char *EVP_CIPHER_get0_description(
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_description);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_CIPHER_names_do_all(const EVP_CIPHER *cipher,
|
|
|
|
|
|
|
|
void (*fn)(const char *name, void *data),
|
|
|
|
|
|
|
|
@@ -705,11 +735,13 @@ const OSSL_PROVIDER *EVP_CIPHER_get0_pro
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return cipher->prov;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_provider);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_CIPHER_get_mode(const EVP_CIPHER *cipher)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return EVP_CIPHER_get_flags(cipher) & EVP_CIPH_MODE;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_mode);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_MD_is_a(const EVP_MD *md, const char *name)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
@@ -733,6 +765,7 @@ const char *EVP_MD_get0_description(cons
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_MD_description);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const char *EVP_MD_get0_name(const EVP_MD *md)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
@@ -746,6 +779,7 @@ const char *EVP_MD_get0_name(const EVP_M
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_MD_name);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_MD_names_do_all(const EVP_MD *md,
|
|
|
|
|
|
|
|
void (*fn)(const char *name, void *data),
|
|
|
|
|
|
|
|
@@ -761,16 +795,19 @@ const OSSL_PROVIDER *EVP_MD_get0_provide
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return md->prov;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_MD_provider);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_MD_get_type(const EVP_MD *md)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return md->type;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_MD_type);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_MD_get_pkey_type(const EVP_MD *md)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return md->pkey_type;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_MD_pkey_type);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_MD_get_block_size(const EVP_MD *md)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
@@ -780,6 +817,7 @@ int EVP_MD_get_block_size(const EVP_MD *
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return md->block_size;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_MD_block_size);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_MD_get_size(const EVP_MD *md)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
@@ -789,11 +827,13 @@ int EVP_MD_get_size(const EVP_MD *md)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return md->md_size;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_MD_size);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unsigned long EVP_MD_get_flags(const EVP_MD *md)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return md->flags;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_MD_flags);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EVP_MD *EVP_MD_meth_new(int md_type, int pkey_type)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
@@ -1007,6 +1047,7 @@ EVP_PKEY_CTX *EVP_MD_CTX_get_pkey_ctx(co
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return ctx->pctx;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_MD_CTX_pkey_ctx);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if !defined(FIPS_MODULE)
|
|
|
|
|
|
|
|
void EVP_MD_CTX_set_pkey_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pctx)
|
|
|
|
|
|
|
|
@@ -1033,6 +1074,7 @@ void *EVP_MD_CTX_get0_md_data(const EVP_
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return ctx->md_data;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_MD_CTX_md_data);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int (*EVP_MD_CTX_update_fn(EVP_MD_CTX *ctx))(EVP_MD_CTX *ctx,
|
|
|
|
|
|
|
|
const void *data, size_t count)
|
|
|
|
|
|
|
|
diff -up openssl-3.0.0-beta1/crypto/evp/evp_rand.c.dual-abi openssl-3.0.0-beta1/crypto/evp/evp_rand.c
|
|
|
|
diff -up openssl-3.0.0-beta1/crypto/evp/evp_rand.c.dual-abi openssl-3.0.0-beta1/crypto/evp/evp_rand.c
|
|
|
|
--- openssl-3.0.0-beta1/crypto/evp/evp_rand.c.dual-abi 2021-07-13 00:54:33.231325700 +0200
|
|
|
|
--- openssl-3.0.0-beta1/crypto/evp/evp_rand.c.dual-abi 2021-07-13 00:54:33.231325700 +0200
|
|
|
|
+++ openssl-3.0.0-beta1/crypto/evp/evp_rand.c 2021-07-13 00:57:22.596922955 +0200
|
|
|
|
+++ openssl-3.0.0-beta1/crypto/evp/evp_rand.c 2021-07-13 00:57:22.596922955 +0200
|
|
|
@ -975,8 +750,8 @@ diff -up openssl-3.0.0-beta1/util/libcrypto.num.dual-abi openssl-3.0.0-beta1/uti
|
|
|
|
--- openssl-3.0.0-beta1/util/libcrypto.num.dual-abi 2021-07-13 23:38:25.166562563 +0200
|
|
|
|
--- openssl-3.0.0-beta1/util/libcrypto.num.dual-abi 2021-07-13 23:38:25.166562563 +0200
|
|
|
|
+++ openssl-3.0.0-beta1/util/libcrypto.num 2021-07-13 23:40:38.622939932 +0200
|
|
|
|
+++ openssl-3.0.0-beta1/util/libcrypto.num 2021-07-13 23:40:38.622939932 +0200
|
|
|
|
@@ -5414,3 +5414,76 @@ ASN1_item_d2i_bio_ex
|
|
|
|
@@ -5414,3 +5414,76 @@ ASN1_item_d2i_bio_ex
|
|
|
|
ASN1_item_d2i_ex ? 3_0_0 EXIST::FUNCTION:
|
|
|
|
EVP_PKEY_get0_provider 5554 3_0_0 EXIST::FUNCTION:
|
|
|
|
ASN1_TIME_print_ex ? 3_0_0 EXIST::FUNCTION:
|
|
|
|
EVP_PKEY_CTX_get0_provider 5555 3_0_0 EXIST::FUNCTION:
|
|
|
|
ossl_safe_getenv ? 3_0_0 EXIST::FUNCTION:
|
|
|
|
ossl_safe_getenv ? 3_0_0 EXIST::FUNCTION:
|
|
|
|
+EVP_ASYM_CIPHER_description ? 3_0_0 EXIST::FUNCTION:
|
|
|
|
+EVP_ASYM_CIPHER_description ? 3_0_0 EXIST::FUNCTION:
|
|
|
|
+EVP_ASYM_CIPHER_name ? 3_0_0 EXIST::FUNCTION:
|
|
|
|
+EVP_ASYM_CIPHER_name ? 3_0_0 EXIST::FUNCTION:
|
|
|
@ -1055,8 +830,8 @@ diff -up openssl-3.0.0-beta1/crypto/provider.c.dual-abi openssl-3.0.0-beta1/cryp
|
|
|
|
--- openssl-3.0.0-beta1/crypto/provider.c.dual-abi 2021-07-14 00:37:49.301207962 +0200
|
|
|
|
--- openssl-3.0.0-beta1/crypto/provider.c.dual-abi 2021-07-14 00:37:49.301207962 +0200
|
|
|
|
+++ openssl-3.0.0-beta1/crypto/provider.c 2021-07-14 00:39:34.796200433 +0200
|
|
|
|
+++ openssl-3.0.0-beta1/crypto/provider.c 2021-07-14 00:39:34.796200433 +0200
|
|
|
|
@@ -13,6 +13,21 @@
|
|
|
|
@@ -13,6 +13,21 @@
|
|
|
|
#include <openssl/core_names.h>
|
|
|
|
|
|
|
|
#include "internal/provider.h"
|
|
|
|
#include "internal/provider.h"
|
|
|
|
|
|
|
|
#include "provider_local.h"
|
|
|
|
|
|
|
|
|
|
|
|
+/* Macro machinery. */
|
|
|
|
+/* Macro machinery. */
|
|
|
|
+
|
|
|
|
+
|
|
|
@ -1125,20 +900,6 @@ diff -up openssl-3.0.0-beta1/crypto/evp/asymcipher.c.dual-abi openssl-3.0.0-beta
|
|
|
|
static int evp_pkey_asym_cipher_init(EVP_PKEY_CTX *ctx, int operation,
|
|
|
|
static int evp_pkey_asym_cipher_init(EVP_PKEY_CTX *ctx, int operation,
|
|
|
|
const OSSL_PARAM params[])
|
|
|
|
const OSSL_PARAM params[])
|
|
|
|
{
|
|
|
|
{
|
|
|
|
diff -up openssl-3.0.0-beta1/crypto/evp/evp_lib.c.dual-abi openssl-3.0.0-beta1/crypto/evp/evp_lib.c
|
|
|
|
|
|
|
|
--- openssl-3.0.0-beta1/crypto/evp/evp_lib.c.dual-abi 2021-07-17 22:24:40.140969959 +0200
|
|
|
|
|
|
|
|
+++ openssl-3.0.0-beta1/crypto/evp/evp_lib.c 2021-07-17 22:25:50.977834241 +0200
|
|
|
|
|
|
|
|
@@ -43,6 +43,10 @@
|
|
|
|
|
|
|
|
#define RHEL_ALIAS1(old_id) \
|
|
|
|
|
|
|
|
RHEL_ALIAS3(RHEL_ALIAS_##old_id, old_id, #old_id)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+#define EVP_MD_description EVP_MD_get0_description
|
|
|
|
|
|
|
|
+#define EVP_MD_provider EVP_MD_get0_provider
|
|
|
|
|
|
|
|
+#define EVP_CIPHER_description EVP_CIPHER_get0_description
|
|
|
|
|
|
|
|
+#define EVP_CIPHER_provider EVP_CIPHER_get0_provider
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if !defined(FIPS_MODULE)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
diff -up openssl-3.0.0-beta1/crypto/evp/evp_rand.c.dual-abi openssl-3.0.0-beta1/crypto/evp/evp_rand.c
|
|
|
|
diff -up openssl-3.0.0-beta1/crypto/evp/evp_rand.c.dual-abi openssl-3.0.0-beta1/crypto/evp/evp_rand.c
|
|
|
|
--- openssl-3.0.0-beta1/crypto/evp/evp_rand.c.dual-abi 2021-07-17 22:29:25.742454581 +0200
|
|
|
|
--- openssl-3.0.0-beta1/crypto/evp/evp_rand.c.dual-abi 2021-07-17 22:29:25.742454581 +0200
|
|
|
|
+++ openssl-3.0.0-beta1/crypto/evp/evp_rand.c 2021-07-17 22:33:36.158699400 +0200
|
|
|
|
+++ openssl-3.0.0-beta1/crypto/evp/evp_rand.c 2021-07-17 22:33:36.158699400 +0200
|
|
|
@ -1289,3 +1050,236 @@ diff -up openssl-3.0.0-beta1/crypto/evp/p_lib.c.dual-abi openssl-3.0.0-beta1/cry
|
|
|
|
static int pkey_set_type(EVP_PKEY *pkey, ENGINE *e, int type, const char *str,
|
|
|
|
static int pkey_set_type(EVP_PKEY *pkey, ENGINE *e, int type, const char *str,
|
|
|
|
int len, EVP_KEYMGMT *keymgmt);
|
|
|
|
int len, EVP_KEYMGMT *keymgmt);
|
|
|
|
static void evp_pkey_free_it(EVP_PKEY *key);
|
|
|
|
static void evp_pkey_free_it(EVP_PKEY *key);
|
|
|
|
|
|
|
|
diff -up openssl-3.0.0-beta2/crypto/evp/evp_lib.c.dual-abi openssl-3.0.0-beta2/crypto/evp/evp_lib.c
|
|
|
|
|
|
|
|
--- openssl-3.0.0-beta2/crypto/evp/evp_lib.c.dual-abi 2021-08-03 12:50:08.359814508 +0200
|
|
|
|
|
|
|
|
+++ openssl-3.0.0-beta2/crypto/evp/evp_lib.c 2021-08-03 12:55:14.025810602 +0200
|
|
|
|
|
|
|
|
@@ -28,6 +28,26 @@
|
|
|
|
|
|
|
|
#include "internal/provider.h"
|
|
|
|
|
|
|
|
#include "evp_local.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+/* Macro machinery. */
|
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
+/* Defines OLD_STRING (a C string) as an alias for NEW_ID (a C
|
|
|
|
|
|
|
|
+ * identifier). The controlling C identifier symbol is ALIAS_ID (a C
|
|
|
|
|
|
|
|
+ * identifier). */
|
|
|
|
|
|
|
|
+#define RHEL_ALIAS3(alias_id, new_id, old_string) \
|
|
|
|
|
|
|
|
+ extern __typeof(new_id) alias_id \
|
|
|
|
|
|
|
|
+ __asm__ (old_string) \
|
|
|
|
|
|
|
|
+ __attribute__ ((__copy__ (new_id), __alias__ (#new_id)))
|
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
+/* Defines an alias using OLD_ID, which must be an macro identifier
|
|
|
|
|
|
|
|
+ * that expands to the new identifier. */
|
|
|
|
|
|
|
|
+#define RHEL_ALIAS1(old_id) \
|
|
|
|
|
|
|
|
+ RHEL_ALIAS3(RHEL_ALIAS_##old_id, old_id, #old_id)
|
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
+#define EVP_MD_description EVP_MD_get0_description
|
|
|
|
|
|
|
|
+#define EVP_MD_provider EVP_MD_get0_provider
|
|
|
|
|
|
|
|
+#define EVP_CIPHER_description EVP_CIPHER_get0_description
|
|
|
|
|
|
|
|
+#define EVP_CIPHER_provider EVP_CIPHER_get0_provider
|
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
#if !defined(FIPS_MODULE)
|
|
|
|
|
|
|
|
# include "crypto/asn1.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
diff -up openssl-3.0.0-beta2/crypto/evp/evp_lib.c.dual-abi openssl-3.0.0-beta2/crypto/evp/evp_lib.c
|
|
|
|
|
|
|
|
--- openssl-3.0.0-beta2/crypto/evp/evp_lib.c.dual-abi 2021-08-03 13:11:46.436671855 +0200
|
|
|
|
|
|
|
|
+++ openssl-3.0.0-beta2/crypto/evp/evp_lib.c 2021-08-03 13:31:36.873461438 +0200
|
|
|
|
|
|
|
|
@@ -337,6 +337,7 @@ int EVP_CIPHER_get_type(const EVP_CIPHER
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_type);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int evp_cipher_cache_constants(EVP_CIPHER *cipher)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
@@ -389,11 +390,13 @@ int EVP_CIPHER_get_block_size(const EVP_
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return cipher->block_size;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_block_size);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_CIPHER_CTX_get_block_size(const EVP_CIPHER_CTX *ctx)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return EVP_CIPHER_get_block_size(ctx->cipher);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_CTX_block_size);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_CIPHER_impl_ctx_size(const EVP_CIPHER *e)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
@@ -466,11 +469,13 @@ int EVP_CIPHER_CTX_is_encrypting(const E
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return ctx->encrypt;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_CTX_encrypting);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unsigned long EVP_CIPHER_get_flags(const EVP_CIPHER *cipher)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return cipher->flags;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_flags);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
@@ -501,6 +506,7 @@ int EVP_CIPHER_get_iv_length(const EVP_C
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return cipher->iv_len;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_iv_length);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_CIPHER_CTX_get_iv_length(const EVP_CIPHER_CTX *ctx)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
@@ -522,6 +543,7 @@ legacy:
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return len;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_CTX_iv_length);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_CIPHER_CTX_get_tag_length(const EVP_CIPHER_CTX *ctx)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
@@ -533,6 +539,7 @@ int EVP_CIPHER_CTX_get_tag_length(const
|
|
|
|
|
|
|
|
ret = evp_do_ciph_ctx_getparams(ctx->cipher, ctx->algctx, params);
|
|
|
|
|
|
|
|
return ret == 1 ? (int)v : 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_CTX_tag_length);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
|
|
|
|
|
|
|
const unsigned char *EVP_CIPHER_CTX_original_iv(const EVP_CIPHER_CTX *ctx)
|
|
|
|
|
|
|
|
@@ -615,6 +622,7 @@ int EVP_CIPHER_CTX_get_num(const EVP_CIP
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ok != 0 ? (int)v : EVP_CTRL_RET_UNSUPPORTED;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_CTX_num);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_CIPHER_CTX_set_num(EVP_CIPHER_CTX *ctx, int num)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
@@ -634,6 +642,7 @@ int EVP_CIPHER_get_key_length(const EVP_
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return cipher->key_len;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_key_length);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_CIPHER_CTX_get_key_length(const EVP_CIPHER_CTX *ctx)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
@@ -646,16 +655,19 @@ int EVP_CIPHER_CTX_get_key_length(const
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ok != 0 ? (int)v : EVP_CTRL_RET_UNSUPPORTED;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_CTX_key_length);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_CIPHER_get_nid(const EVP_CIPHER *cipher)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return cipher->nid;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_nid);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_CIPHER_CTX_get_nid(const EVP_CIPHER_CTX *ctx)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return ctx->cipher->nid;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_CTX_nid);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_CIPHER_is_a(const EVP_CIPHER *cipher, const char *name)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
@@ -679,6 +691,7 @@ const char *EVP_CIPHER_get0_name(const E
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_name);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const char *EVP_CIPHER_get0_description(const EVP_CIPHER *cipher)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
@@ -690,6 +703,7 @@ const char *EVP_CIPHER_get0_description(
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_description);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_CIPHER_names_do_all(const EVP_CIPHER *cipher,
|
|
|
|
|
|
|
|
void (*fn)(const char *name, void *data),
|
|
|
|
|
|
|
|
@@ -705,11 +719,13 @@ const OSSL_PROVIDER *EVP_CIPHER_get0_pro
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return cipher->prov;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_provider);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_CIPHER_get_mode(const EVP_CIPHER *cipher)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return EVP_CIPHER_get_flags(cipher) & EVP_CIPH_MODE;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_CIPHER_mode);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_MD_is_a(const EVP_MD *md, const char *name)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
@@ -733,6 +749,7 @@ const char *EVP_MD_get0_description(cons
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_MD_description);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const char *EVP_MD_get0_name(const EVP_MD *md)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
@@ -746,6 +763,7 @@ const char *EVP_MD_get0_name(const EVP_M
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_MD_name);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_MD_names_do_all(const EVP_MD *md,
|
|
|
|
|
|
|
|
void (*fn)(const char *name, void *data),
|
|
|
|
|
|
|
|
@@ -761,16 +779,19 @@ const OSSL_PROVIDER *EVP_MD_get0_provide
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return md->prov;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_MD_provider);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_MD_get_type(const EVP_MD *md)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return md->type;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_MD_type);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_MD_get_pkey_type(const EVP_MD *md)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return md->pkey_type;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_MD_pkey_type);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_MD_get_block_size(const EVP_MD *md)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
@@ -780,6 +801,7 @@ int EVP_MD_get_block_size(const EVP_MD *
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return md->block_size;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_MD_block_size);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int EVP_MD_get_size(const EVP_MD *md)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
@@ -789,11 +811,13 @@ int EVP_MD_get_size(const EVP_MD *md)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return md->md_size;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_MD_size);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unsigned long EVP_MD_get_flags(const EVP_MD *md)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return md->flags;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_MD_flags);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EVP_MD *EVP_MD_meth_new(int md_type, int pkey_type)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
@@ -1008,6 +1032,7 @@ EVP_PKEY_CTX *EVP_MD_CTX_get_pkey_ctx(co
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return ctx->pctx;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_MD_CTX_pkey_ctx);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if !defined(FIPS_MODULE)
|
|
|
|
|
|
|
|
void EVP_MD_CTX_set_pkey_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pctx)
|
|
|
|
|
|
|
|
@@ -1034,6 +1059,7 @@ void *EVP_MD_CTX_get0_md_data(const EVP_
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return ctx->md_data;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+RHEL_ALIAS1(EVP_MD_CTX_md_data);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int (*EVP_MD_CTX_update_fn(EVP_MD_CTX *ctx))(EVP_MD_CTX *ctx,
|
|
|
|
|
|
|
|
const void *data, size_t count)
|
|
|
|