Add a nid 2 algorithm name mapping capability
authorMatt Caswell <matt@openssl.org>
Thu, 20 Jun 2019 10:48:50 +0000 (11:48 +0100)
committerMatt Caswell <matt@openssl.org>
Fri, 28 Jun 2019 09:22:21 +0000 (10:22 +0100)
commit4cecf7a127fbe18316140963acf8787139f90f8d
tree25b9337e24fcee96d68f80328daf9982f214e140
parent45c54042d02362f083143c09513e57317f983244
Add a nid 2 algorithm name mapping capability

Providers that link against libcrypto can just use OBJ_nid2sn() to look
up the name of an algorithm given a NID. However that doesn't work for the
FIPS provider because OBJ_nid2sn() is not available there (due to the
reliance of the code on ASN.1 types). Therefore we provider a new function
to do this mapping. For providers linking against libcrypto the new function
just wraps OBJ_nid2sn(). For the FIPS provider it has a look up for all the
NIDs known there.

Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/9035)
doc/internal/man3/ossl_prov_util_nid_to_name.pod [new file with mode: 0644]
providers/common/build.info
providers/common/include/internal/providercommon.h
providers/common/provlib.c [new file with mode: 0644]
providers/fips/fipsprov.c