summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDr. Matthias St. Pierre <matthias.st.pierre@ncp-e.com>2020-10-15 12:55:50 +0300
committerMatt Caswell <matt@openssl.org>2020-10-15 11:59:53 +0100
commitb425001010044adbdbcd98f8682694b30b73bbf4 (patch)
treee87a5b512d7869cb6a500ecc74b706281be762cf /include
parent29000e43ea257bf54f6ccb2064b3744853b821b2 (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 'include')
-rw-r--r--include/crypto/asn1.h4
-rw-r--r--include/crypto/bn.h2
-rw-r--r--include/crypto/decoder.h4
-rw-r--r--include/crypto/dh.h6
-rw-r--r--include/crypto/dsa.h2
-rw-r--r--include/crypto/ec.h7
-rw-r--r--include/crypto/ecx.h16
-rw-r--r--include/crypto/encoder.h2
-rw-r--r--include/crypto/evp.h18
-rw-r--r--include/crypto/rsa.h10
-rw-r--r--include/crypto/siv.h4
-rw-r--r--include/crypto/x509.h16
-rw-r--r--include/internal/core.h10
-rw-r--r--include/internal/cryptlib.h92
-rw-r--r--include/internal/ffc.h14
-rw-r--r--include/internal/namemap.h2
-rw-r--r--include/internal/property.h13
-rw-r--r--include/internal/provider.h10
-rw-r--r--include/internal/thread_once.h2
-rw-r--r--include/openssl/asn1.h.in6
-rw-r--r--include/openssl/bn.h4
-rw-r--r--include/openssl/cmp.h.in4
-rw-r--r--include/openssl/cms.h.in18
-rw-r--r--include/openssl/conf.h.in6
-rw-r--r--include/openssl/crmf.h.in10
-rw-r--r--include/openssl/crypto.h.in14
-rw-r--r--include/openssl/ct.h.in8
-rw-r--r--include/openssl/decoder.h8
-rw-r--r--include/openssl/ec.h8
-rw-r--r--include/openssl/encoder.h8
-rw-r--r--include/openssl/evp.h67
-rw-r--r--include/openssl/kdf.h4
-rw-r--r--include/openssl/ocsp.h.in4
-rw-r--r--include/openssl/pem.h14
-rw-r--r--include/openssl/pkcs7.h.in8
-rw-r--r--include/openssl/provider.h12
-rw-r--r--include/openssl/rand.h14
-rw-r--r--include/openssl/self_test.h4
-rw-r--r--include/openssl/srp.h.in12
-rw-r--r--include/openssl/ssl.h.in4
-rw-r--r--include/openssl/store.h12
-rw-r--r--include/openssl/types.h2
-rw-r--r--include/openssl/x509.h.in12
-rw-r--r--include/openssl/x509_vfy.h.in22
44 files changed, 262 insertions, 257 deletions
diff --git a/include/crypto/asn1.h b/include/crypto/asn1.h
index 08018e4cf1..0d5d2116de 100644
--- a/include/crypto/asn1.h
+++ b/include/crypto/asn1.h
@@ -76,13 +76,13 @@ struct evp_pkey_asn1_method_st {
/* Exports and imports to / from providers */
size_t (*dirty_cnt) (const EVP_PKEY *pk);
int (*export_to) (const EVP_PKEY *pk, void *to_keydata,
- EVP_KEYMGMT *to_keymgmt, OPENSSL_CTX *libctx,
+ EVP_KEYMGMT *to_keymgmt, OSSL_LIB_CTX *libctx,
const char *propq);
OSSL_CALLBACK *import_from;
int (*priv_decode_ex) (EVP_PKEY *pk,
const PKCS8_PRIV_KEY_INFO *p8inf,
- OPENSSL_CTX *libctx,
+ OSSL_LIB_CTX *libctx,
const char *propq);
} /* EVP_PKEY_ASN1_METHOD */ ;
diff --git a/include/crypto/bn.h b/include/crypto/bn.h
index f2cb30de0a..6652760aa2 100644
--- a/include/crypto/bn.h
+++ b/include/crypto/bn.h
@@ -110,7 +110,7 @@ int bn_rsa_fips186_4_derive_prime(BIGNUM *Y, BIGNUM *X, const BIGNUM *Xin,
const BIGNUM *r1, const BIGNUM *r2, int nlen,
const BIGNUM *e, BN_CTX *ctx, BN_GENCB *cb);
-OPENSSL_CTX *bn_get_lib_ctx(BN_CTX *ctx);
+OSSL_LIB_CTX *bn_get_lib_ctx(BN_CTX *ctx);
extern const BIGNUM bn_inv_sqrt_2;
diff --git a/include/crypto/decoder.h b/include/crypto/decoder.h
index f025b3ec37..f19e8bf841 100644
--- a/include/crypto/decoder.h
+++ b/include/crypto/decoder.h
@@ -12,7 +12,7 @@
# include <openssl/decoder.h>
-OSSL_DECODER *ossl_decoder_fetch_by_number(OPENSSL_CTX *libctx,
+OSSL_DECODER *ossl_decoder_fetch_by_number(OSSL_LIB_CTX *libctx,
int id,
const char *properties);
@@ -33,7 +33,7 @@ int ossl_decoder_ctx_add_decoder_inst(OSSL_DECODER_CTX *ctx,
int ossl_decoder_ctx_setup_for_EVP_PKEY(OSSL_DECODER_CTX *ctx,
EVP_PKEY **pkey, const char *keytype,
- OPENSSL_CTX *libctx,
+ OSSL_LIB_CTX *libctx,
const char *propquery);
#endif
diff --git a/include/crypto/dh.h b/include/crypto/dh.h
index e419993cfe..cd7e1e4a89 100644
--- a/include/crypto/dh.h
+++ b/include/crypto/dh.h
@@ -11,8 +11,8 @@
#include <openssl/dh.h>
#include "internal/ffc.h"
-DH *dh_new_by_nid_ex(OPENSSL_CTX *libctx, int nid);
-DH *dh_new_ex(OPENSSL_CTX *libctx);
+DH *dh_new_by_nid_ex(OSSL_LIB_CTX *libctx, int nid);
+DH *dh_new_ex(OSSL_LIB_CTX *libctx);
int dh_generate_ffc_parameters(DH *dh, int type, int pbits, int qbits,
BN_GENCB *cb);
@@ -40,4 +40,4 @@ int dh_KDF_X9_42_asn1(unsigned char *out, size_t outlen,
const unsigned char *Z, size_t Zlen,
const char *cek_alg,
const unsigned char *ukm, size_t ukmlen, const EVP_MD *md,
- OPENSSL_CTX *libctx, const char *propq);
+ OSSL_LIB_CTX *libctx, const char *propq);
diff --git a/include/crypto/dsa.h b/include/crypto/dsa.h
index 7fe9f3ad9b..759fa4cce4 100644
--- a/include/crypto/dsa.h
+++ b/include/crypto/dsa.h
@@ -14,7 +14,7 @@
#define DSA_PARAMGEN_TYPE_FIPS_186_4 0 /* Use FIPS186-4 standard */
#define DSA_PARAMGEN_TYPE_FIPS_186_2 1 /* Use legacy FIPS186-2 standard */
-DSA *dsa_new_with_ctx(OPENSSL_CTX *libctx);
+DSA *dsa_new_with_ctx(OSSL_LIB_CTX *libctx);
int dsa_generate_ffc_parameters(DSA *dsa, int type, int pbits, int qbits,
BN_GENCB *cb);
diff --git a/include/crypto/ec.h b/include/crypto/ec.h
index 8e8fa3d825..ffd5f19071 100644
--- a/include/crypto/ec.h
+++ b/include/crypto/ec.h
@@ -47,19 +47,20 @@ __owur int ec_group_do_inverse_ord(const EC_GROUP *group, BIGNUM *res,
int ecdh_KDF_X9_63(unsigned char *out, size_t outlen,
const unsigned char *Z, size_t Zlen,
const unsigned char *sinfo, size_t sinfolen,
- const EVP_MD *md, OPENSSL_CTX *libctx, const char *propq);
+ const EVP_MD *md, OSSL_LIB_CTX *libctx, const char *propq);
int ec_key_public_check(const EC_KEY *eckey, BN_CTX *ctx);
int ec_key_private_check(const EC_KEY *eckey);
int ec_key_pairwise_check(const EC_KEY *eckey, BN_CTX *ctx);
-OPENSSL_CTX *ec_key_get_libctx(const EC_KEY *eckey);
+OSSL_LIB_CTX *ec_key_get_libctx(const EC_KEY *eckey);
const char *ec_key_get0_propq(const EC_KEY *eckey);
const char *ec_curve_nid2name(int nid);
int ec_curve_name2nid(const char *name);
/* Backend support */
int ec_group_todata(const EC_GROUP *group, OSSL_PARAM_BLD *tmpl,
- OSSL_PARAM params[], OPENSSL_CTX *libctx, const char *propq,
+ OSSL_PARAM params[], OSSL_LIB_CTX *libctx,
+ const char *propq,
BN_CTX *bnctx, unsigned char **genbuf);
int ec_group_fromdata(EC_KEY *ec, const OSSL_PARAM params[]);
int ec_key_fromdata(EC_KEY *ecx, const OSSL_PARAM params[], int include_private);
diff --git a/include/crypto/ecx.h b/include/crypto/ecx.h
index 8730f93872..4771df5fb6 100644
--- a/include/crypto/ecx.h
+++ b/include/crypto/ecx.h
@@ -61,7 +61,7 @@ typedef enum {
: EVP_PKEY_ED448)))
struct ecx_key_st {
- OPENSSL_CTX *libctx;
+ OSSL_LIB_CTX *libctx;
char *propq;
unsigned int haspubkey:1;
unsigned char pubkey[MAX_KEYLEN];
@@ -75,7 +75,7 @@ struct ecx_key_st {
typedef struct ecx_key_st ECX_KEY;
size_t ecx_key_length(ECX_KEY_TYPE type);
-ECX_KEY *ecx_key_new(OPENSSL_CTX *libctx, ECX_KEY_TYPE type, int haspubkey,
+ECX_KEY *ecx_key_new(OSSL_LIB_CTX *libctx, ECX_KEY_TYPE type, int haspubkey,
const char *propq);
unsigned char *ecx_key_allocate_privkey(ECX_KEY *key);
void ecx_key_free(ECX_KEY *key);
@@ -86,23 +86,23 @@ int X25519(uint8_t out_shared_key[32], const uint8_t private_key[32],
void X25519_public_from_private(uint8_t out_public_value[32],
const uint8_t private_key[32]);
-int ED25519_public_from_private(OPENSSL_CTX *ctx, uint8_t out_public_key[32],
+int ED25519_public_from_private(OSSL_LIB_CTX *ctx, uint8_t out_public_key[32],
const uint8_t private_key[32], const char *propq);
int ED25519_sign(uint8_t *out_sig, const uint8_t *message, size_t message_len,
const uint8_t public_key[32], const uint8_t private_key[32],
- OPENSSL_CTX *libctx, const char *propq);
+ OSSL_LIB_CTX *libctx, const char *propq);
int ED25519_verify(const uint8_t *message, size_t message_len,
const uint8_t signature[64], const uint8_t public_key[32],
- OPENSSL_CTX *libctx, const char *propq);
+ OSSL_LIB_CTX *libctx, const char *propq);
-int ED448_public_from_private(OPENSSL_CTX *ctx, uint8_t out_public_key[57],
+int ED448_public_from_private(OSSL_LIB_CTX *ctx, uint8_t out_public_key[57],
const uint8_t private_key[57], const char *propq);
-int ED448_sign(OPENSSL_CTX *ctx, uint8_t *out_sig, const uint8_t *message,
+int ED448_sign(OSSL_LIB_CTX *ctx, uint8_t *out_sig, const uint8_t *message,
size_t message_len, const uint8_t public_key[57],
const uint8_t private_key[57], const uint8_t *context,
size_t context_len, const char *propq);
-int ED448_verify(OPENSSL_CTX *ctx, const uint8_t *message, size_t message_len,
+int ED448_verify(OSSL_LIB_CTX *ctx, const uint8_t *message, size_t message_len,
const uint8_t signature[114], const uint8_t public_key[57],
const uint8_t *context, size_t context_len, const char *propq);
diff --git a/include/crypto/encoder.h b/include/crypto/encoder.h
index 2f036456a2..a04ba93d54 100644
--- a/include/crypto/encoder.h
+++ b/include/crypto/encoder.h
@@ -9,5 +9,5 @@
#include <openssl/types.h>
-OSSL_ENCODER *ossl_encoder_fetch_by_number(OPENSSL_CTX *libctx, int id,
+OSSL_ENCODER *ossl_encoder_fetch_by_number(OSSL_LIB_CTX *libctx, int id,
const char *properties);
diff --git a/include/crypto/evp.h b/include/crypto/evp.h
index ac20b5b512..6eac2a0b63 100644
--- a/include/crypto/evp.h
+++ b/include/crypto/evp.h
@@ -42,7 +42,7 @@ struct evp_pkey_ctx_st {
* Library context, property query, keytype and keymgmt associated with
* this context
*/
- OPENSSL_CTX *libctx;
+ OSSL_LIB_CTX *libctx;
const char *propquery;
const char *keytype;
EVP_KEYMGMT *keymgmt;
@@ -699,7 +699,7 @@ void openssl_add_all_ciphers_int(void);
void openssl_add_all_digests_int(void);
void evp_cleanup_int(void);
void evp_app_cleanup_int(void);
-void *evp_pkey_export_to_provider(EVP_PKEY *pk, OPENSSL_CTX *libctx,
+void *evp_pkey_export_to_provider(EVP_PKEY *pk, OSSL_LIB_CTX *libctx,
EVP_KEYMGMT **keymgmt,
const char *propquery);
#ifndef FIPS_MODULE
@@ -801,13 +801,15 @@ void evp_encode_ctx_set_flags(EVP_ENCODE_CTX *ctx, unsigned int flags);
/* Use the SRP base64 alphabet instead of the standard one */
#define EVP_ENCODE_CTX_USE_SRP_ALPHABET 2
-const EVP_CIPHER *evp_get_cipherbyname_ex(OPENSSL_CTX *libctx, const char *name);
-const EVP_MD *evp_get_digestbyname_ex(OPENSSL_CTX *libctx, const char *name);
+const EVP_CIPHER *evp_get_cipherbyname_ex(OSSL_LIB_CTX *libctx,
+ const char *name);
+const EVP_MD *evp_get_digestbyname_ex(OSSL_LIB_CTX *libctx,
+ const char *name);
int pkcs5_pbkdf2_hmac_ex(const char *pass, int passlen,
const unsigned char *salt, int saltlen, int iter,
const EVP_MD *digest, int keylen, unsigned char *out,
- OPENSSL_CTX *libctx, const char *propq);
+ OSSL_LIB_CTX *libctx, const char *propq);
#ifndef FIPS_MODULE
/*
@@ -826,7 +828,7 @@ int evp_pkey_ctx_set_params_strict(EVP_PKEY_CTX *ctx, OSSL_PARAM *params);
int evp_pkey_ctx_get_params_strict(EVP_PKEY_CTX *ctx, OSSL_PARAM *params);
EVP_MD_CTX *evp_md_ctx_new_ex(EVP_PKEY *pkey, const ASN1_OCTET_STRING *id,
- OPENSSL_CTX *libctx, const char *propq);
+ OSSL_LIB_CTX *libctx, const char *propq);
int evp_pkey_name2type(const char *name);
int evp_pkey_ctx_set1_id_prov(EVP_PKEY_CTX *ctx, const void *id, int len);
@@ -835,8 +837,8 @@ int evp_pkey_ctx_get1_id_len_prov(EVP_PKEY_CTX *ctx, size_t *id_len);
int evp_pkey_ctx_use_cached_data(EVP_PKEY_CTX *ctx);
#endif /* !defined(FIPS_MODULE) */
-void evp_method_store_flush(OPENSSL_CTX *libctx);
-int evp_set_default_properties_int(OPENSSL_CTX *libctx, const char *propq,
+void evp_method_store_flush(OSSL_LIB_CTX *libctx);
+int evp_set_default_properties_int(OSSL_LIB_CTX *libctx, const char *propq,
int loadconfig);
void evp_md_ctx_clear_digest(EVP_MD_CTX *ctx, int force);
diff --git a/include/crypto/rsa.h b/include/crypto/rsa.h
index 7ec745766f..1ee1991f57 100644
--- a/include/crypto/rsa.h
+++ b/include/crypto/rsa.h
@@ -48,8 +48,8 @@ const char *ossl_rsa_mgf_nid2name(int mgf);
int ossl_rsa_oaeppss_md2nid(const EVP_MD *md);
const char *ossl_rsa_oaeppss_nid2name(int md);
-RSA *ossl_rsa_new_with_ctx(OPENSSL_CTX *libctx);
-OPENSSL_CTX *ossl_rsa_get0_libctx(RSA *r);
+RSA *ossl_rsa_new_with_ctx(OSSL_LIB_CTX *libctx);
+OSSL_LIB_CTX *ossl_rsa_get0_libctx(RSA *r);
int ossl_rsa_set0_all_params(RSA *r, const STACK_OF(BIGNUM) *primes,
const STACK_OF(BIGNUM) *exps,
@@ -64,14 +64,14 @@ int ossl_rsa_pss_params_30_todata(const RSA_PSS_PARAMS_30 *pss,
OSSL_PARAM_BLD *bld, OSSL_PARAM params[]);
int ossl_rsa_pss_params_30_fromdata(RSA_PSS_PARAMS_30 *pss_params,
const OSSL_PARAM params[],
- OPENSSL_CTX *libctx);
+ OSSL_LIB_CTX *libctx);
-int ossl_rsa_padding_check_PKCS1_type_2_TLS(OPENSSL_CTX *ctx, unsigned char *to,
+int ossl_rsa_padding_check_PKCS1_type_2_TLS(OSSL_LIB_CTX *ctx, unsigned char *to,
size_t tlen,
const unsigned char *from,
size_t flen, int client_version,
int alt_version);
-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/include/crypto/siv.h b/include/crypto/siv.h
index fd39be00db..52560e704e 100644
--- a/include/crypto/siv.h
+++ b/include/crypto/siv.h
@@ -13,10 +13,10 @@ typedef struct siv128_context SIV128_CONTEXT;
SIV128_CONTEXT *CRYPTO_siv128_new(const unsigned char *key, int klen,
EVP_CIPHER *cbc, EVP_CIPHER *ctr,
- OPENSSL_CTX *libctx, const char *propq);
+ OSSL_LIB_CTX *libctx, const char *propq);
int CRYPTO_siv128_init(SIV128_CONTEXT *ctx, const unsigned char *key, int klen,
const EVP_CIPHER *cbc, const EVP_CIPHER *ctr,
- OPENSSL_CTX *libctx, const char *propq);
+ OSSL_LIB_CTX *libctx, const char *propq);
int CRYPTO_siv128_copy_ctx(SIV128_CONTEXT *dest, SIV128_CONTEXT *src);
int CRYPTO_siv128_aad(SIV128_CONTEXT *ctx, const unsigned char *aad,
size_t len);
diff --git a/include/crypto/x509.h b/include/crypto/x509.h
index 3457d69609..6fa5d22dc6 100644
--- a/include/crypto/x509.h
+++ b/include/crypto/x509.h
@@ -115,7 +115,7 @@ struct X509_crl_st {
void *meth_data;
CRYPTO_RWLOCK *lock;
- OPENSSL_CTX *libctx;
+ OSSL_LIB_CTX *libctx;
const char *propq;
};
@@ -195,7 +195,7 @@ struct x509_st {
/* Set on live certificates for authentication purposes */
ASN1_OCTET_STRING *distinguishing_id;
- OPENSSL_CTX *libctx;
+ OSSL_LIB_CTX *libctx;
const char *propq;
} /* X509 */ ;
@@ -271,7 +271,7 @@ struct x509_store_ctx_st { /* X509_STORE_CTX */
/* signed via bare TA public key, rather than CA certificate */
int bare_ta_signed;
- OPENSSL_CTX *libctx;
+ OSSL_LIB_CTX *libctx;
char *propq;
};
@@ -305,16 +305,16 @@ int x509_set1_time(ASN1_TIME **ptm, const ASN1_TIME *tm);
int x509_print_ex_brief(BIO *bio, X509 *cert, unsigned long neg_cflags);
int x509v3_cache_extensions(X509 *x);
int x509_init_sig_info(X509 *x);
-int x509_check_issued_int(X509 *issuer, X509 *subject, OPENSSL_CTX *libctx,
+int x509_check_issued_int(X509 *issuer, X509 *subject, OSSL_LIB_CTX *libctx,
const char *propq);
-int x509_set0_libctx(X509 *x, OPENSSL_CTX *libctx, const char *propq);
-int x509_crl_set0_libctx(X509_CRL *x, OPENSSL_CTX *libctx, const char *propq);
+int x509_set0_libctx(X509 *x, OSSL_LIB_CTX *libctx, const char *propq);
+int x509_crl_set0_libctx(X509_CRL *x, OSSL_LIB_CTX *libctx, const char *propq);
int x509_init_sig_info(X509 *x);
int asn1_item_digest_ex(const ASN1_ITEM *it, const EVP_MD *type, void *data,
unsigned char *md, unsigned int *len,
- OPENSSL_CTX *libctx, const char *propq);
+ OSSL_LIB_CTX *libctx, const char *propq);
int X509_add_cert_new(STACK_OF(X509) **sk, X509 *cert, int flags);
-int X509_PUBKEY_get0_libctx(OPENSSL_CTX **plibctx, const char **ppropq,
+int X509_PUBKEY_get0_libctx(OSSL_LIB_CTX **plibctx, const char **ppropq,
const X509_PUBKEY *key);
diff --git a/include/internal/core.h b/include/internal/core.h
index 8823b3c744..8499f35794 100644
--- a/include/internal/core.h
+++ b/include/internal/core.h
@@ -28,13 +28,13 @@
*/
typedef struct ossl_method_construct_method_st {
/* Create store */
- void *(*alloc_tmp_store)(OPENSSL_CTX *ctx);
+ void *(*alloc_tmp_store)(OSSL_LIB_CTX *ctx);
/* Remove a store */
void (*dealloc_tmp_store)(void *store);
/* Get an already existing method from a store */
- void *(*get)(OPENSSL_CTX *libctx, void *store, void *data);
+ void *(*get)(OSSL_LIB_CTX *libctx, void *store, void *data);
/* Store a method in a store */
- int (*put)(OPENSSL_CTX *libctx, void *store, void *method,
+ int (*put)(OSSL_LIB_CTX *libctx, void *store, void *method,
const OSSL_PROVIDER *prov, int operation_id, const char *name,
const char *propdef, void *data);
/* Construct a new method */
@@ -44,11 +44,11 @@ typedef struct ossl_method_construct_method_st {
void (*destruct)(void *method, void *data);
} OSSL_METHOD_CONSTRUCT_METHOD;
-void *ossl_method_construct(OPENSSL_CTX *ctx, int operation_id,
+void *ossl_method_construct(OSSL_LIB_CTX *ctx, int operation_id,
int force_cache,
OSSL_METHOD_CONSTRUCT_METHOD *mcm, void *mcm_data);
-void ossl_algorithm_do_all(OPENSSL_CTX *libctx, int operation_id,
+void ossl_algorithm_do_all(OSSL_LIB_CTX *libctx, int operation_id,
OSSL_PROVIDER *provider,
int (*pre)(OSSL_PROVIDER *, int operation_id,
void *data, int *result),
diff --git a/include/internal/cryptlib.h b/include/internal/cryptlib.h
index a01b1f15d5..e070618547 100644
--- a/include/internal/cryptlib.h
+++ b/include/internal/cryptlib.h
@@ -91,8 +91,8 @@ void OPENSSL_cpuid_setup(void);
extern unsigned int OPENSSL_ia32cap_P[];
#endif
void OPENSSL_showfatal(const char *fmta, ...);
-int do_ex_data_init(OPENSSL_CTX *ctx);
-void crypto_cleanup_all_ex_data_int(OPENSSL_CTX *ctx);
+int do_ex_data_init(OSSL_LIB_CTX *ctx);
+void crypto_cleanup_all_ex_data_int(OSSL_LIB_CTX *ctx);
int openssl_init_fork_handlers(void);
int openssl_get_fork_id(void);
@@ -138,62 +138,62 @@ typedef struct ossl_ex_data_global_st {
} OSSL_EX_DATA_GLOBAL;
-/* OPENSSL_CTX */
-
-# define OPENSSL_CTX_PROVIDER_STORE_RUN_ONCE_INDEX 0
-# define OPENSSL_CTX_DEFAULT_METHOD_STORE_RUN_ONCE_INDEX 1
-# define OPENSSL_CTX_METHOD_STORE_RUN_ONCE_INDEX 2
-# define OPENSSL_CTX_MAX_RUN_ONCE 3
-
-# define OPENSSL_CTX_EVP_METHOD_STORE_INDEX 0
-# define OPENSSL_CTX_PROVIDER_STORE_INDEX 1
-# define OPENSSL_CTX_PROPERTY_DEFN_INDEX 2
-# define OPENSSL_CTX_PROPERTY_STRING_INDEX 3
-# define OPENSSL_CTX_NAMEMAP_INDEX 4
-# define OPENSSL_CTX_DRBG_INDEX 5
-# define OPENSSL_CTX_DRBG_NONCE_INDEX 6
-# define OPENSSL_CTX_RAND_CRNGT_INDEX 7
-# define OPENSSL_CTX_THREAD_EVENT_HANDLER_INDEX 8
-# define OPENSSL_CTX_FIPS_PROV_INDEX 9
-# define OPENSSL_CTX_ENCODER_STORE_INDEX 10
-# define OPENSSL_CTX_DECODER_STORE_INDEX 11
-# define OPENSSL_CTX_SELF_TEST_CB_INDEX 12
-# define OPENSSL_CTX_BIO_PROV_INDEX 13
-# define OPENSSL_CTX_GLOBAL_PROPERTIES 14
-# define OPENSSL_CTX_STORE_LOADER_STORE_INDEX 15
-# define OPENSSL_CTX_MAX_INDEXES 16
-
-typedef struct openssl_ctx_method {
- void *(*new_func)(OPENSSL_CTX *ctx);
+/* OSSL_LIB_CTX */
+
+# define OSSL_LIB_CTX_PROVIDER_STORE_RUN_ONCE_INDEX 0
+# define OSSL_LIB_CTX_DEFAULT_METHOD_STORE_RUN_ONCE_INDEX 1
+# define OSSL_LIB_CTX_METHOD_STORE_RUN_ONCE_INDEX 2
+# define OSSL_LIB_CTX_MAX_RUN_ONCE 3
+
+# define OSSL_LIB_CTX_EVP_METHOD_STORE_INDEX 0
+# define OSSL_LIB_CTX_PROVIDER_STORE_INDEX 1
+# define OSSL_LIB_CTX_PROPERTY_DEFN_INDEX 2
+# define OSSL_LIB_CTX_PROPERTY_STRING_INDEX 3
+# define OSSL_LIB_CTX_NAMEMAP_INDEX 4
+# define OSSL_LIB_CTX_DRBG_INDEX 5
+# define OSSL_LIB_CTX_DRBG_NONCE_INDEX 6
+# define OSSL_LIB_CTX_RAND_CRNGT_INDEX 7
+# define OSSL_LIB_CTX_THREAD_EVENT_HANDLER_INDEX 8
+# define OSSL_LIB_CTX_FIPS_PROV_INDEX 9
+# define OSSL_LIB_CTX_ENCODER_STORE_INDEX 10
+# define OSSL_LIB_CTX_DECODER_STORE_INDEX 11
+# define OSSL_LIB_CTX_SELF_TEST_CB_INDEX 12
+# define OSSL_LIB_CTX_BIO_PROV_INDEX 13
+# define OSSL_LIB_CTX_GLOBAL_PROPERTIES 14
+# define OSSL_LIB_CTX_STORE_LOADER_STORE_INDEX 15
+# define OSSL_LIB_CTX_MAX_INDEXES 16
+
+typedef struct ossl_lib_ctx_method {
+ void *(*new_func)(OSSL_LIB_CTX *ctx);
void (*free_func)(void *);
-} OPENSSL_CTX_METHOD;
+} OSSL_LIB_CTX_METHOD;
-OPENSSL_CTX *openssl_ctx_get_concrete(OPENSSL_CTX *ctx);
-int openssl_ctx_is_default(OPENSSL_CTX *ctx);
-int openssl_ctx_is_global_default(OPENSSL_CTX *ctx);
+OSSL_LIB_CTX *ossl_lib_ctx_get_concrete(OSSL_LIB_CTX *ctx);
+int ossl_lib_ctx_is_default(OSSL_LIB_CTX *ctx);
+int ossl_lib_ctx_is_global_default(OSSL_LIB_CTX *ctx);
/* Functions to retrieve pointers to data by index */
-void *openssl_ctx_get_data(OPENSSL_CTX *, int /* index */,
- const OPENSSL_CTX_METHOD * ctx);
+void *ossl_lib_ctx_get_data(OSSL_LIB_CTX *, int /* index */,
+ const OSSL_LIB_CTX_METHOD * ctx);
-void openssl_ctx_default_deinit(void);
-OSSL_EX_DATA_GLOBAL *openssl_ctx_get_ex_data_global(OPENSSL_CTX *ctx);
-typedef int (openssl_ctx_run_once_fn)(OPENSSL_CTX *ctx);
-typedef void (openssl_ctx_onfree_fn)(OPENSSL_CTX *ctx);
+void ossl_lib_ctx_default_deinit(void);
+OSSL_EX_DATA_GLOBAL *ossl_lib_ctx_get_ex_data_global(OSSL_LIB_CTX *ctx);
+typedef int (ossl_lib_ctx_run_once_fn)(OSSL_LIB_CTX *ctx);
+typedef void (ossl_lib_ctx_onfree_fn)(OSSL_LIB_CTX *ctx);
-int openssl_ctx_run_once(OPENSSL_CTX *ctx, unsigned int idx,
- openssl_ctx_run_once_fn run_once_fn);
-int openssl_ctx_onfree(OPENSSL_CTX *ctx, openssl_ctx_onfree_fn onfreefn);
+int ossl_lib_ctx_run_once(OSSL_LIB_CTX *ctx, unsigned int idx,
+ ossl_lib_ctx_run_once_fn run_once_fn);
+int ossl_lib_ctx_onfree(OSSL_LIB_CTX *ctx, ossl_lib_ctx_onfree_fn onfreefn);
-OPENSSL_CTX *crypto_ex_data_get_openssl_ctx(const CRYPTO_EX_DATA *ad);
-int crypto_new_ex_data_ex(OPENSSL_CTX *ctx, int class_index, void *obj,
+OSSL_LIB_CTX *crypto_ex_data_get_ossl_lib_ctx(const CRYPTO_EX_DATA *ad);
+int crypto_new_ex_data_ex(OSSL_LIB_CTX *ctx, int class_index, void *obj,
CRYPTO_EX_DATA *ad);
-int crypto_get_ex_new_index_ex(OPENSSL_CTX *ctx, int class_index,
+int crypto_get_ex_new_index_ex(OSSL_LIB_CTX *ctx, int class_index,
long argl, void *argp,
CRYPTO_EX_new *new_func,
CRYPTO_EX_dup *dup_func,
CRYPTO_EX_free *free_func);
-int crypto_free_ex_index_ex(OPENSSL_CTX *ctx, int class_index, int idx);
+int crypto_free_ex_index_ex(OSSL_LIB_CTX *ctx, int class_index, int idx);
/* Function for simple binary search */
diff --git a/include/internal/ffc.h b/include/internal/ffc.h
index 37ebbb5c8e..3e5d98f8e1 100644
--- a/include/internal/ffc.h
+++ b/include/internal/ffc.h
@@ -145,28 +145,28 @@ int ossl_ffc_params_print(BIO *bp, const FFC_PARAMS *ffc, int indent);
#endif /* FIPS_MODULE */
-int ossl_ffc_params_FIPS186_4_generate(OPENSSL_CTX *libctx, FFC_PARAMS *params,
+int ossl_ffc_params_FIPS186_4_generate(OSSL_LIB_CTX *libctx, FFC_PARAMS *params,
int type, size_t L, size_t N,
int *res, BN_GENCB *cb);
-int ossl_ffc_params_FIPS186_2_generate(OPENSSL_CTX *libctx, FFC_PARAMS *params,
+int ossl_ffc_params_FIPS186_2_generate(OSSL_LIB_CTX *libctx, FFC_PARAMS *params,
int type,