Modify providers that keep track of underlying algorithms
authorRichard Levitte <levitte@openssl.org>
Sat, 14 Sep 2019 14:35:08 +0000 (16:35 +0200)
committerRichard Levitte <levitte@openssl.org>
Thu, 19 Sep 2019 12:58:17 +0000 (14:58 +0200)
commit7cfa1717b812a126ce6f8e4cc32139164c89d789
tree6baeb081c8d404bb4e82cabe0d42b5c78a356e19
parentf7c16d48a945e80f22f6f02550ee3fe14edb52fa
Modify providers that keep track of underlying algorithms

With some provider implementations, there are underlying ciphers,
digests and macs.  For some of them, the name was retrieved from the
method, but since the methods do not store those any more, we add
different mechanics.

For code that needs to pass on the name of a cipher or diges via
parameters, we simply locally store the name that was used when
fetching said cipher or digest.  This will ensure that any underlying
code that needs to fetch that same cipher or digest does so with the
exact same name instead of any random name from the set of names
associated with the algorithm.

For code that needs to check what kind of algorithm was passed, we
provide EVP_{type}_is_a(), that returns true if the given method has
the given name as one of its names.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9897)
12 files changed:
crypto/evp/evp_fetch.c
crypto/evp/evp_lib.c
crypto/evp/evp_locl.h
crypto/evp/mac_meth.c
crypto/evp/pkey_mac.c
doc/man3/EVP_EncryptInit.pod
doc/man3/EVP_MAC.pod
include/openssl/evp.h
providers/common/include/internal/provider_util.h
providers/common/kdfs/sskdf.c
providers/common/provider_util.c
util/libcrypto.num