Add OSSL_PROVIDER_name()
authorRichard Levitte <levitte@openssl.org>
Wed, 10 Jul 2019 21:00:22 +0000 (23:00 +0200)
committerRichard Levitte <levitte@openssl.org>
Tue, 23 Jul 2019 04:34:09 +0000 (06:34 +0200)
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9356)

crypto/provider.c
doc/man3/OSSL_PROVIDER.pod
include/openssl/provider.h
util/libcrypto.num

index 4e21bfe6d7664026369d53bc0a8176532f25bfa1..8c9c6dae14bb76bdbad545b8009fcd18b8295061 100644 (file)
@@ -68,3 +68,8 @@ int OSSL_PROVIDER_add_builtin(OPENSSL_CTX *libctx, const char *name,
 
     return 1;
 }
+
+const char *OSSL_PROVIDER_name(const OSSL_PROVIDER *prov)
+{
+    return ossl_provider_name(prov);
+}
index 9fe2e18a69a4c093054a5aab9a55003c2a39d428..fec67060f0cd8297648e593955a6f1e21ddf5d47 100644 (file)
@@ -4,7 +4,7 @@
 
 OSSL_PROVIDER, OSSL_PROVIDER_load, OSSL_PROVIDER_unload,
 OSSL_PROVIDER_get_param_types, OSSL_PROVIDER_get_params,
-OSSL_PROVIDER_add_builtin - provider routines
+OSSL_PROVIDER_add_builtin, OSSL_PROVIDER_name - provider routines
 
 =head1 SYNOPSIS
 
@@ -21,6 +21,8 @@ OSSL_PROVIDER_add_builtin - provider routines
  int OSSL_PROVIDER_add_builtin(OPENSSL_CTX *, const char *name,
                                ossl_provider_init_fn *init_fn);
 
+ const char *OSSL_PROVIDER_name(const OSSL_PROVIDER *prov);
+
 =head1 DESCRIPTION
 
 B<OSSL_PROVIDER> is a type that holds internal information about
@@ -59,6 +61,8 @@ The caller must prepare the B<OSSL_PARAM> array before calling this
 function, and the variables acting as buffers for this parameter array
 should be filled with data when it returns successfully.
 
+OSSL_PROVIDER_name() returns the name of the given provider.
+
 =head1 RETURN VALUES
 
 OSSL_PROVIDER_add() returns 1 on success, or 0 on error.
index c7f66645f7ed3b04883c5deaa4b17442bace8141..722e83b14a43b73d526829f50d35ae2a23bfe0e3 100644 (file)
@@ -27,6 +27,9 @@ int OSSL_PROVIDER_get_params(const OSSL_PROVIDER *prov, OSSL_PARAM params[]);
 int OSSL_PROVIDER_add_builtin(OPENSSL_CTX *, const char *name,
                               OSSL_provider_init_fn *init_fn);
 
+/* Information */
+const char *OSSL_PROVIDER_name(const OSSL_PROVIDER *prov);
+
 # ifdef __cplusplus
 }
 # endif
index 1a8d91b2d68cc874b14ab5cd8ff987790250fac7..3caf9b859cb9b28957249aa7e00e84bc4bf63bd6 100644 (file)
@@ -4695,3 +4695,4 @@ EVP_MD_name                             4800      3_0_0   EXIST::FUNCTION:
 EVP_CIPHER_name                         4801   3_0_0   EXIST::FUNCTION:
 EVP_MD_provider                         4802   3_0_0   EXIST::FUNCTION:
 EVP_CIPHER_provider                     4803   3_0_0   EXIST::FUNCTION:
+OSSL_PROVIDER_name                      4804   3_0_0   EXIST::FUNCTION: