From a8f6d2642d1b011961022a5d9aa9e1156097b85c Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Fri, 8 Nov 2019 10:29:24 +0100 Subject: 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) --- providers/common/build.info | 4 ++-- providers/common/nid_to_name.c | 21 +++++++++++++++++++++ providers/common/provlib.c | 21 --------------------- 3 files changed, 23 insertions(+), 23 deletions(-) create mode 100644 providers/common/nid_to_name.c delete mode 100644 providers/common/provlib.c (limited to 'providers') 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); -} - -- cgit v1.2.3