summaryrefslogtreecommitdiffstats
path: root/crypto/store
diff options
context:
space:
mode:
authorDr. Matthias St. Pierre <matthias.st.pierre@ncp-e.com>2020-10-15 11:55:50 +0200
committerMatt Caswell <matt@openssl.org>2020-10-15 12:59:53 +0200
commitb425001010044adbdbcd98f8682694b30b73bbf4 (patch)
treee87a5b512d7869cb6a500ecc74b706281be762cf /crypto/store
parentMake evp_pkey_ctx_get0_libctx/propq public API (diff)
downloadopenssl-b425001010044adbdbcd98f8682694b30b73bbf4.tar.xz
openssl-b425001010044adbdbcd98f8682694b30b73bbf4.zip
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/store')
-rw-r--r--crypto/store/store_lib.c4
-rw-r--r--crypto/store/store_local.h4
-rw-r--r--crypto/store/store_meth.c32
-rw-r--r--crypto/store/store_result.c24
4 files changed, 32 insertions, 32 deletions
diff --git a/crypto/store/store_lib.c b/crypto/store/store_lib.c
index 94f47d0394..1ce61ea9da 100644
--- a/crypto/store/store_lib.c
+++ b/crypto/store/store_lib.c
@@ -32,7 +32,7 @@
static int ossl_store_close_it(OSSL_STORE_CTX *ctx);
OSSL_STORE_CTX *
-OSSL_STORE_open_ex(const char *uri, OPENSSL_CTX *libctx, const char *propq,
+OSSL_STORE_open_ex(const char *uri, OSSL_LIB_CTX *libctx, const char *propq,
const UI_METHOD *ui_method, void *ui_data,
OSSL_STORE_post_process_info_fn post_process,
void *post_process_data)
@@ -916,7 +916,7 @@ const EVP_MD *OSSL_STORE_SEARCH_get0_digest(const OSSL_STORE_SEARCH *criterion)
}
OSSL_STORE_CTX *OSSL_STORE_attach(BIO *bp, const char *scheme,
- OPENSSL_CTX *libctx, const char *propq,
+ OSSL_LIB_CTX *libctx, const char *propq,
const UI_METHOD *ui_method, void *ui_data,
OSSL_STORE_post_process_info_fn post_process,
void *post_process_data)
diff --git a/crypto/store/store_local.h b/crypto/store/store_local.h
index e5488606e4..56a90a125b 100644
--- a/crypto/store/store_local.h
+++ b/crypto/store/store_local.h
@@ -171,10 +171,10 @@ int ossl_store_file_detach_pem_bio_int(OSSL_STORE_LOADER_CTX *ctx);
* Provider stuff
* -------------------
*/
-OSSL_STORE_LOADER *ossl_store_loader_fetch(OPENSSL_CTX *libctx,
+OSSL_STORE_LOADER *ossl_store_loader_fetch(OSSL_LIB_CTX *libctx,
const char *scheme,
const char *properties);
-OSSL_STORE_LOADER *ossl_store_loader_fetch_by_number(OPENSSL_CTX *libctx,
+OSSL_STORE_LOADER *ossl_store_loader_fetch_by_number(OSSL_LIB_CTX *libctx,
int scheme_id,
const char *properties);
diff --git a/crypto/store/store_meth.c b/crypto/store/store_meth.c
index 6af5ec14f2..5a8aad22b8 100644
--- a/crypto/store/store_meth.c
+++ b/crypto/store/store_meth.c
@@ -74,20 +74,20 @@ static void loader_store_free(void *vstore)
ossl_method_store_free(vstore);
}
-static void *loader_store_new(OPENSSL_CTX *ctx)
+static void *loader_store_new(OSSL_LIB_CTX *ctx)
{
return ossl_method_store_new(ctx);
}
-static const OPENSSL_CTX_METHOD loader_store_method = {
+static const OSSL_LIB_CTX_METHOD loader_store_method = {
loader_store_new,
loader_store_free,
};
/* Data to be passed through ossl_method_construct() */
struct loader_data_st {
- OPENSSL_CTX *libctx;
+ OSSL_LIB_CTX *libctx;
OSSL_METHOD_CONSTRUCT_METHOD *mcm;
int scheme_id; /* For get_loader_from_store() */
const char *scheme; /* For get_loader_from_store() */
@@ -100,7 +100,7 @@ struct loader_data_st {
*/
/* Temporary loader method store, constructor and destructor */
-static void *alloc_tmp_loader_store(OPENSSL_CTX *ctx)
+static void *alloc_tmp_loader_store(OSSL_LIB_CTX *ctx)
{
return ossl_method_store_new(ctx);
}
@@ -112,14 +112,14 @@ static void *alloc_tmp_loader_store(OPENSSL_CTX *ctx)
}
/* Get the permanent loader store */
-static OSSL_METHOD_STORE *get_loader_store(OPENSSL_CTX *libctx)
+static OSSL_METHOD_STORE *get_loader_store(OSSL_LIB_CTX *libctx)
{
- return openssl_ctx_get_data(libctx, OPENSSL_CTX_STORE_LOADER_STORE_INDEX,
+ return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_STORE_LOADER_STORE_INDEX,
&loader_store_method);
}
/* Get loader methods from a store, or put one in */
-static void *get_loader_from_store(OPENSSL_CTX *libctx, void *store,
+static void *get_loader_from_store(OSSL_LIB_CTX *libctx, void *store,
void *data)
{
struct loader_data_st *methdata = data;
@@ -141,7 +141,7 @@ static void *get_loader_from_store(OPENSSL_CTX *libctx, void *store,
return method;
}
-static int put_loader_in_store(OPENSSL_CTX *libctx, void *store,
+static int put_loader_in_store(OSSL_LIB_CTX *libctx, void *store,
void *method, const OSSL_PROVIDER *prov,
int operation_id, const char *scheme,
const char *propdef, void *unused)
@@ -235,7 +235,7 @@ static void *construct_loader(const OSSL_ALGORITHM *algodef,
* namemap entry, this is it. Should the scheme already exist there, we
* know that ossl_namemap_add() will return its corresponding number.
*/
- OPENSSL_CTX *libctx = ossl_provider_library_context(prov);
+ OSSL_LIB_CTX *libctx = ossl_provider_library_context(prov);
OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
const char *scheme = algodef->algorithm_names;
int id = ossl_namemap_add_name(namemap, 0, scheme);
@@ -254,7 +254,7 @@ static void destruct_loader(void *method, void *data)
}
/* Fetching support. Can fetch by numeric identity or by scheme */
-static OSSL_STORE_LOADER *inner_loader_fetch(OPENSSL_CTX *libctx,
+static OSSL_STORE_LOADER *inner_loader_fetch(OSSL_LIB_CTX *libctx,
int id, const char *scheme,
const char *properties)
{
@@ -311,13 +311,13 @@ static OSSL_STORE_LOADER *inner_loader_fetch(OPENSSL_CTX *libctx,
}
OSSL_STORE_LOADER *OSSL_STORE_LOADER_fetch(const char *scheme,
- OPENSSL_CTX *libctx,
+ OSSL_LIB_CTX *libctx,
const char *properties)
{
return inner_loader_fetch(libctx, 0, scheme, properties);
}
-OSSL_STORE_LOADER *ossl_store_loader_fetch_by_number(OPENSSL_CTX *libctx,
+OSSL_STORE_LOADER *ossl_store_loader_fetch_by_number(OSSL_LIB_CTX *libctx,
int scheme_id,
const char *properties)
{
@@ -361,7 +361,7 @@ int OSSL_STORE_LOADER_number(const OSSL_STORE_LOADER *loader)
int OSSL_STORE_LOADER_is_a(const OSSL_STORE_LOADER *loader, const char *name)
{
if (loader->prov != NULL) {
- OPENSSL_CTX *libctx = ossl_provider_library_context(loader->prov);
+ OSSL_LIB_CTX *libctx = ossl_provider_library_context(loader->prov);
OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
return ossl_namemap_name2num(namemap, name) == loader->scheme_id;
@@ -379,7 +379,7 @@ static void loader_do_one(OSSL_PROVIDER *provider,
int no_store, void *vdata)
{
struct loader_do_all_data_st *data = vdata;
- OPENSSL_CTX *libctx = ossl_provider_library_context(provider);
+ OSSL_LIB_CTX *libctx = ossl_provider_library_context(provider);
OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
const char *name = algodef->algorithm_names;
int id = ossl_namemap_add_name(namemap, 0, name);
@@ -395,7 +395,7 @@ static void loader_do_one(OSSL_PROVIDER *provider,
}
}
-void OSSL_STORE_LOADER_do_all_provided(OPENSSL_CTX *libctx,
+void OSSL_STORE_LOADER_do_all_provided(OSSL_LIB_CTX *libctx,
void (*fn)(OSSL_STORE_LOADER *loader,
void *arg),
void *arg)
@@ -417,7 +417,7 @@ void OSSL_STORE_LOADER_names_do_all(const OSSL_STORE_LOADER *loader,
return;
if (loader->prov != NULL) {
- OPENSSL_CTX *libctx = ossl_provider_library_context(loader->prov);
+ OSSL_LIB_CTX *libctx = ossl_provider_library_context(loader->prov);
OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
ossl_namemap_doall_names(namemap, loader->scheme_id, fn, data);
diff --git a/crypto/store/store_result.c b/crypto/store/store_result.c
index 200544d72d..ddff1225b8 100644
--- a/crypto/store/store_result.c
+++ b/crypto/store/store_result.c
@@ -73,13 +73,13 @@ struct extracted_param_data_st {
static int try_name(struct extracted_param_data_st *, OSSL_STORE_INFO **);
static int try_key(struct extracted_param_data_st *, OSSL_STORE_INFO **,
OSSL_STORE_CTX *, const OSSL_PROVIDER *,
- OPENSSL_CTX *, const char *);
+ OSSL_LIB_CTX *, const char *);
static int try_cert(struct extracted_param_data_st *, OSSL_STORE_INFO **,
- OPENSSL_CTX *, const char *);
+ OSSL_LIB_CTX *, const char *);
static int try_crl(struct extracted_param_data_st *, OSSL_STORE_INFO **,
- OPENSSL_CTX *, const char *);
+ OSSL_LIB_CTX *, const char *);
static int try_pkcs12(struct extracted_param_data_st *, OSSL_STORE_INFO **,
- OSSL_STORE_CTX *, OPENSSL_CTX *, const char *);
+ OSSL_STORE_CTX *, OSSL_LIB_CTX *, const char *);
#define SET_ERR_MARK() ERR_set_mark()
#define CLEAR_ERR_MARK() \
@@ -107,7 +107,7 @@ int ossl_store_handle_load_result(const OSSL_PARAM params[], void *arg)
OSSL_STORE_CTX *ctx = cbdata->ctx;
const OSSL_PROVIDER *provider =
OSSL_STORE_LOADER_provider(ctx->fetched_loader);
- OPENSSL_CTX *libctx = ossl_provider_library_context(provider);
+ OSSL_LIB_CTX *libctx = ossl_provider_library_context(provider);
const char *propq = ctx->properties;
const OSSL_PARAM *p;
struct extracted_param_data_st helper_data;
@@ -192,7 +192,7 @@ static int try_name(struct extracted_param_data_st *data, OSSL_STORE_INFO **v)
static EVP_PKEY *try_key_ref(struct extracted_param_data_st *data,
OSSL_STORE_CTX *ctx,
const OSSL_PROVIDER *provider,
- OPENSSL_CTX *libctx, const char *propq)
+ OSSL_LIB_CTX *libctx, const char *propq)
{
EVP_PKEY *pk = NULL;
EVP_KEYMGMT *keymgmt = NULL;
@@ -247,7 +247,7 @@ static EVP_PKEY *try_key_ref(struct extracted_param_data_st *data,
static EVP_PKEY *try_key_value(struct extracted_param_data_st *data,
OSSL_STORE_CTX *ctx,
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg,
- OPENSSL_CTX *libctx, const char *propq)
+ OSSL_LIB_CTX *libctx, const char *propq)
{
EVP_PKEY *pk = NULL;
OSSL_DECODER_CTX *decoderctx = NULL;
@@ -272,7 +272,7 @@ static EVP_PKEY *try_key_value_legacy(struct extracted_param_data_st *data,
store_info_new_fn **store_info_new,
OSSL_STORE_CTX *ctx,
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg,
- OPENSSL_CTX *libctx, const char *propq)
+ OSSL_LIB_CTX *libctx, const char *propq)
{
EVP_PKEY *pk = NULL;
const unsigned char *der = data->octet_data, *derp;
@@ -351,7 +351,7 @@ static EVP_PKEY *try_key_value_legacy(struct extracted_param_data_st *data,
static int try_key(struct extracted_param_data_st *data, OSSL_STORE_INFO **v,
OSSL_STORE_CTX *ctx, const OSSL_PROVIDER *provider,
- OPENSSL_CTX *libctx, const char *propq)
+ OSSL_LIB_CTX *libctx, const char *propq)
{
store_info_new_fn *store_info_new = NULL;
@@ -422,7 +422,7 @@ static int try_key(struct extracted_param_data_st *data, OSSL_STORE_INFO **v,
}
static int try_cert(struct extracted_param_data_st *data, OSSL_STORE_INFO **v,
- OPENSSL_CTX *libctx, const char *propq)
+ OSSL_LIB_CTX *libctx, const char *propq)
{
if (data->object_type == OSSL_OBJECT_UNKNOWN
|| data->object_type == OSSL_OBJECT_CERT) {
@@ -469,7 +469,7 @@ static int try_cert(struct extracted_param_data_st *data, OSSL_STORE_INFO **v,
}
static int try_crl(struct extracted_param_data_st *data, OSSL_STORE_INFO **v,
- OPENSSL_CTX *libctx, const char *propq)
+ OSSL_LIB_CTX *libctx, const char *propq)
{
if (data->object_type == OSSL_OBJECT_UNKNOWN
|| data->object_type == OSSL_OBJECT_CRL) {
@@ -497,7 +497,7 @@ static int try_crl(struct extracted_param_data_st *data, OSSL_STORE_INFO **v,
static int try_pkcs12(struct extracted_param_data_st *data, OSSL_STORE_INFO **v,
OSSL_STORE_CTX *ctx,
- OPENSSL_CTX *libctx, const char *propq)
+ OSSL_LIB_CTX *libctx, const char *propq)
{
/* There is no specific object type for PKCS12 */
if (data->object_type == OSSL_OBJECT_UNKNOWN) {