diff options
author | Richard Levitte <levitte@openssl.org> | 2019-09-14 16:22:19 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-09-19 14:58:17 +0200 |
commit | f7c16d48a945e80f22f6f02550ee3fe14edb52fa (patch) | |
tree | b6ec900293f5a14213aa1836c916ea4e11f7c260 /include/internal/core.h | |
parent | Fix Solaris compile errors in provider ciphers (diff) | |
download | openssl-f7c16d48a945e80f22f6f02550ee3fe14edb52fa.tar.xz openssl-f7c16d48a945e80f22f6f02550ee3fe14edb52fa.zip |
In provider implemented methods, save the name number, not the name string
Multiple names per implementation is already supported in the namemap,
but hasn't been used yet. However, as soon as we have multiple names,
we will get an issue with what name should be saved in the method.
The solution is to not save the name itself, but rather the number
it's associated with. This number is supposed to be unique for each
set of names, and we assume that algorithm names are globally unique,
i.e. there can be no name overlap between different algorithm types.
Incidently, it was also found that the 'get' function used by
ossl_construct_method() doesn't need all the parameters it was given;
most of what it needs, it can now get through the data structure given
by the caller of ossl_construct_method(). As a consequence,
ossl_construct_method() itself doesn't need all the parameters it was
given either.
There are some added internal functions that are expected to disappear
as soon as legacy code is removed, such as evp_first_name() and
ossl_namemap_num2name().
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9897)
Diffstat (limited to 'include/internal/core.h')
-rw-r--r-- | include/internal/core.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/include/internal/core.h b/include/internal/core.h index a40d3c69af..d2229e173b 100644 --- a/include/internal/core.h +++ b/include/internal/core.h @@ -32,9 +32,7 @@ typedef struct ossl_method_construct_method_st { /* Remove a store */ void (*dealloc_tmp_store)(void *store); /* Get an already existing method from a store */ - void *(*get)(OPENSSL_CTX *libctx, void *store, - int operation_id, const char *name, const char *propquery, - void *data); + void *(*get)(OPENSSL_CTX *libctx, void *store, void *data); /* Store a method in a store */ int (*put)(OPENSSL_CTX *libctx, void *store, void *method, const OSSL_PROVIDER *prov, int operation_id, const char *name, @@ -47,7 +45,6 @@ typedef struct ossl_method_construct_method_st { } OSSL_METHOD_CONSTRUCT_METHOD; void *ossl_method_construct(OPENSSL_CTX *ctx, int operation_id, - const char *name, const char *properties, int force_cache, OSSL_METHOD_CONSTRUCT_METHOD *mcm, void *mcm_data); |