diff options
author | Dr. Matthias St. Pierre <matthias.st.pierre@ncp-e.com> | 2020-10-15 12:55:50 +0300 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2020-10-15 11:59:53 +0100 |
commit | b425001010044adbdbcd98f8682694b30b73bbf4 (patch) | |
tree | e87a5b512d7869cb6a500ecc74b706281be762cf /crypto/rsa | |
parent | 29000e43ea257bf54f6ccb2064b3744853b821b2 (diff) |
Rename OPENSSL_CTX prefix to OSSL_LIB_CTX
Many of the new types introduced by OpenSSL 3.0 have an OSSL_ prefix,
e.g., OSSL_CALLBACK, OSSL_PARAM, OSSL_ALGORITHM, OSSL_SERIALIZER.
The OPENSSL_CTX type stands out a little by using a different prefix.
For consistency reasons, this type is renamed to OSSL_LIB_CTX.
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12621)
Diffstat (limited to 'crypto/rsa')
-rw-r--r-- | crypto/rsa/rsa_ameth.c | 6 | ||||
-rw-r--r-- | crypto/rsa/rsa_backend.c | 2 | ||||
-rw-r--r-- | crypto/rsa/rsa_gen.c | 4 | ||||
-rw-r--r-- | crypto/rsa/rsa_lib.c | 8 | ||||
-rw-r--r-- | crypto/rsa/rsa_local.h | 6 | ||||
-rw-r--r-- | crypto/rsa/rsa_oaep.c | 2 | ||||
-rw-r--r-- | crypto/rsa/rsa_pk1.c | 4 | ||||
-rw-r--r-- | crypto/rsa/rsa_ssl.c | 2 |
8 files changed, 17 insertions, 17 deletions
diff --git a/crypto/rsa/rsa_ameth.c b/crypto/rsa/rsa_ameth.c index c693ca7e21..d767e4a9f0 100644 --- a/crypto/rsa/rsa_ameth.c +++ b/crypto/rsa/rsa_ameth.c @@ -889,7 +889,7 @@ static size_t rsa_pkey_dirty_cnt(const EVP_PKEY *pkey) */ static int rsa_int_export_to(const EVP_PKEY *from, int rsa_type, void *to_keydata, EVP_KEYMGMT *to_keymgmt, - OPENSSL_CTX *libctx, const char *propq) + OSSL_LIB_CTX *libctx, const char *propq) { RSA *rsa = from->pkey.rsa; OSSL_PARAM_BLD *tmpl = OSSL_PARAM_BLD_new(); @@ -1019,7 +1019,7 @@ static int rsa_int_import_from(const OSSL_PARAM params[], void *vpctx, } static int rsa_pkey_export_to(const EVP_PKEY *from, void *to_keydata, - EVP_KEYMGMT *to_keymgmt, OPENSSL_CTX *libctx, + EVP_KEYMGMT *to_keymgmt, OSSL_LIB_CTX *libctx, const char *propq) { return rsa_int_export_to(from, RSA_FLAG_TYPE_RSA, to_keydata, @@ -1027,7 +1027,7 @@ static int rsa_pkey_export_to(const EVP_PKEY *from, void *to_keydata, } static int rsa_pss_pkey_export_to(const EVP_PKEY *from, void *to_keydata, - EVP_KEYMGMT *to_keymgmt, OPENSSL_CTX *libctx, + EVP_KEYMGMT *to_keymgmt, OSSL_LIB_CTX *libctx, const char *propq) { return rsa_int_export_to(from, RSA_FLAG_TYPE_RSASSAPSS, to_keydata, diff --git a/crypto/rsa/rsa_backend.c b/crypto/rsa/rsa_backend.c index 9279e71857..f64fb34d52 100644 --- a/crypto/rsa/rsa_backend.c +++ b/crypto/rsa/rsa_backend.c @@ -212,7 +212,7 @@ int ossl_rsa_pss_params_30_todata(const RSA_PSS_PARAMS_30 *pss, int ossl_rsa_pss_params_30_fromdata(RSA_PSS_PARAMS_30 *pss_params, const OSSL_PARAM params[], - OPENSSL_CTX *libctx) + OSSL_LIB_CTX *libctx) { const OSSL_PARAM *param_md, *param_mgf, *param_mgf1md, *param_saltlen; const OSSL_PARAM *param_propq; diff --git a/crypto/rsa/rsa_gen.c b/crypto/rsa/rsa_gen.c index 58c7806ffd..9ee5998829 100644 --- a/crypto/rsa/rsa_gen.c +++ b/crypto/rsa/rsa_gen.c @@ -28,7 +28,7 @@ #include "rsa_local.h" static int rsa_keygen_pairwise_test(RSA *rsa, OSSL_CALLBACK *cb, void *cbarg); -static int rsa_keygen(OPENSSL_CTX *libctx, RSA *rsa, int bits, int primes, +static int rsa_keygen(OSSL_LIB_CTX *libctx, RSA *rsa, int bits, int primes, BIGNUM *e_value, BN_GENCB *cb, int pairwise_test); /* @@ -419,7 +419,7 @@ static int rsa_multiprime_keygen(RSA *rsa, int bits, int primes, } #endif /* FIPS_MODULE */ -static int rsa_keygen(OPENSSL_CTX *libctx, RSA *rsa, int bits, int primes, +static int rsa_keygen(OSSL_LIB_CTX *libctx, RSA *rsa, int bits, int primes, BIGNUM *e_value, BN_GENCB *cb, int pairwise_test) { int ok = 0; diff --git a/crypto/rsa/rsa_lib.c b/crypto/rsa/rsa_lib.c index a73df12dc6..e4315f06cd 100644 --- a/crypto/rsa/rsa_lib.c +++ b/crypto/rsa/rsa_lib.c @@ -27,7 +27,7 @@ #include "crypto/security_bits.h" #include "rsa_local.h" -static RSA *rsa_new_intern(ENGINE *engine, OPENSSL_CTX *libctx); +static RSA *rsa_new_intern(ENGINE *engine, OSSL_LIB_CTX *libctx); #ifndef FIPS_MODULE RSA *RSA_new(void) @@ -66,12 +66,12 @@ RSA *RSA_new_method(ENGINE *engine) } #endif -RSA *ossl_rsa_new_with_ctx(OPENSSL_CTX *libctx) +RSA *ossl_rsa_new_with_ctx(OSSL_LIB_CTX *libctx) { return rsa_new_intern(NULL, libctx); } -static RSA *rsa_new_intern(ENGINE *engine, OPENSSL_CTX *libctx) +static RSA *rsa_new_intern(ENGINE *engine, OSSL_LIB_CTX *libctx) { RSA *ret = OPENSSL_zalloc(sizeof(*ret)); @@ -189,7 +189,7 @@ int RSA_up_ref(RSA *r) return i > 1 ? 1 : 0; } -OPENSSL_CTX *ossl_rsa_get0_libctx(RSA *r) +OSSL_LIB_CTX *ossl_rsa_get0_libctx(RSA *r) { return r->libctx; } diff --git a/crypto/rsa/rsa_local.h b/crypto/rsa/rsa_local.h index f5c6be31a9..60e590998b 100644 --- a/crypto/rsa/rsa_local.h +++ b/crypto/rsa/rsa_local.h @@ -56,7 +56,7 @@ struct rsa_st { */ int dummy_zero; - OPENSSL_CTX *libctx; + OSSL_LIB_CTX *libctx; int32_t version; const RSA_METHOD *meth; /* functional reference if 'meth' is ENGINE-provided */ @@ -196,10 +196,10 @@ int ossl_rsa_fips186_4_gen_prob_primes(RSA *rsa, RSA_ACVP_TEST *test, int nbits, const BIGNUM *e, BN_CTX *ctx, BN_GENCB *cb); -int ossl_rsa_padding_add_SSLv23_ex(OPENSSL_CTX *libctx, unsigned char *to, +int ossl_rsa_padding_add_SSLv23_ex(OSSL_LIB_CTX *libctx, unsigned char *to, int tlen, const unsigned char *from, int flen); -int ossl_rsa_padding_add_PKCS1_type_2_ex(OPENSSL_CTX *libctx, unsigned char *to, +int ossl_rsa_padding_add_PKCS1_type_2_ex(OSSL_LIB_CTX *libctx, unsigned char *to, int tlen, const unsigned char *from, int flen); diff --git a/crypto/rsa/rsa_oaep.c b/crypto/rsa/rsa_oaep.c index 17200e787a..809e752bee 100644 --- a/crypto/rsa/rsa_oaep.c +++ b/crypto/rsa/rsa_oaep.c @@ -51,7 +51,7 @@ int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen, * Step numbers are included here but not in the constant time inverse below * to avoid complicating an already difficult enough function. */ -int ossl_rsa_padding_add_PKCS1_OAEP_mgf1_ex(OPENSSL_CTX *libctx, +int ossl_rsa_padding_add_PKCS1_OAEP_mgf1_ex(OSSL_LIB_CTX *libctx, unsigned char *to, int tlen, const unsigned char *from, int flen, const unsigned char *param, diff --git a/crypto/rsa/rsa_pk1.c b/crypto/rsa/rsa_pk1.c index 64f6864740..daa8297300 100644 --- a/crypto/rsa/rsa_pk1.c +++ b/crypto/rsa/rsa_pk1.c @@ -124,7 +124,7 @@ int RSA_padding_check_PKCS1_type_1(unsigned char *to, int tlen, return j; } -int ossl_rsa_padding_add_PKCS1_type_2_ex(OPENSSL_CTX *libctx, unsigned char *to, +int ossl_rsa_padding_add_PKCS1_type_2_ex(OSSL_LIB_CTX *libctx, unsigned char *to, int tlen, const unsigned char *from, int flen) { @@ -298,7 +298,7 @@ int RSA_padding_check_PKCS1_type_2(unsigned char *to, int tlen, * decrypted data will be randomly generated (as per * https://tools.ietf.org/html/rfc5246#section-7.4.7.1). */ -int ossl_rsa_padding_check_PKCS1_type_2_TLS(OPENSSL_CTX *libctx, +int ossl_rsa_padding_check_PKCS1_type_2_TLS(OSSL_LIB_CTX *libctx, unsigned char *to, size_t tlen, const unsigned char *from, size_t flen, int client_version, diff --git a/crypto/rsa/rsa_ssl.c b/crypto/rsa/rsa_ssl.c index e2cf98d884..7e688aa9bc 100644 --- a/crypto/rsa/rsa_ssl.c +++ b/crypto/rsa/rsa_ssl.c @@ -21,7 +21,7 @@ #include "internal/constant_time.h" #include "rsa_local.h" -int ossl_rsa_padding_add_SSLv23_ex(OPENSSL_CTX *libctx, unsigned char *to, +int ossl_rsa_padding_add_SSLv23_ex(OSSL_LIB_CTX *libctx, unsigned char *to, int tlen, const unsigned char *from, int flen) { |