Rename providers/common/provlib.c to nid_to_name.c
authorRichard Levitte <levitte@openssl.org>
Fri, 8 Nov 2019 09:29:24 +0000 (10:29 +0100)
committerRichard Levitte <levitte@openssl.org>
Sun, 10 Nov 2019 04:05:06 +0000 (05:05 +0100)
It contains only one function, which should only get added to non-FIPS
providers.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/10389)

providers/common/build.info
providers/common/nid_to_name.c [new file with mode: 0644]
providers/common/provlib.c [deleted file]

index 4e662eb97a6a7c565739cbf344262856c53afde3..df05c49cd28b076eceb71be564180e6531e336cd 100644 (file)
@@ -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 (file)
index 0000000..af2a7cb
--- /dev/null
@@ -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 <openssl/objects.h>
+#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 (file)
index e754b84..0000000
+++ /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 <openssl/objects.h>
-#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);
-}
-