From: Richard Levitte Date: Fri, 8 Nov 2019 09:29:24 +0000 (+0100) Subject: Rename providers/common/provlib.c to nid_to_name.c X-Git-Tag: openssl-3.0.0-alpha1~985 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a8f6d2642d1b011961022a5d9aa9e1156097b85c;p=oweals%2Fopenssl.git Rename providers/common/provlib.c to nid_to_name.c It contains only one function, which should only get added to non-FIPS providers. Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/10389) --- diff --git a/providers/common/build.info b/providers/common/build.info index 4e662eb97a..df05c49cd2 100644 --- a/providers/common/build.info +++ b/providers/common/build.info @@ -1,6 +1,6 @@ SUBDIRS=digests ciphers -SOURCE[../libcommon.a]=provider_err.c provlib.c +SOURCE[../libcommon.a]=provider_err.c $FIPSCOMMON=provider_util.c -SOURCE[../libnonfips.a]=$FIPSCOMMON +SOURCE[../libnonfips.a]=$FIPSCOMMON nid_to_name.c SOURCE[../libfips.a]=$FIPSCOMMON diff --git a/providers/common/nid_to_name.c b/providers/common/nid_to_name.c new file mode 100644 index 0000000000..af2a7cbc6a --- /dev/null +++ b/providers/common/nid_to_name.c @@ -0,0 +1,21 @@ +/* + * Copyright 2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the Apache License 2.0 (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#include +#include "prov/providercommon.h" + +/* + * The FIPS provider has its own version of this in fipsprov.c because it does + * not have OBJ_nid2sn(); + */ +const char *ossl_prov_util_nid_to_name(int nid) +{ + return OBJ_nid2sn(nid); +} + diff --git a/providers/common/provlib.c b/providers/common/provlib.c deleted file mode 100644 index e754b84d35..0000000000 --- a/providers/common/provlib.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include -#include "prov/providercommon.h" - -/* - * The FIPS provider has its own version of this in fipsprov.c because it does - * not have OBJ_nid2sn(); - */ -const char *ossl_prov_util_nid_to_name(int nid) -{ - return OBJ_nid2sn(nid); -} -