diff --git a/crypto/provider.c b/crypto/provider.c index 4e21bfe6d7..8c9c6dae14 100644 --- a/crypto/provider.c +++ b/crypto/provider.c @@ -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); +} diff --git a/doc/man3/OSSL_PROVIDER.pod b/doc/man3/OSSL_PROVIDER.pod index 9fe2e18a69..fec67060f0 100644 --- a/doc/man3/OSSL_PROVIDER.pod +++ b/doc/man3/OSSL_PROVIDER.pod @@ -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 is a type that holds internal information about @@ -59,6 +61,8 @@ The caller must prepare the B 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. diff --git a/include/openssl/provider.h b/include/openssl/provider.h index c7f66645f7..722e83b14a 100644 --- a/include/openssl/provider.h +++ b/include/openssl/provider.h @@ -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 diff --git a/util/libcrypto.num b/util/libcrypto.num index 1a8d91b2d6..3caf9b859c 100644 --- a/util/libcrypto.num +++ b/util/libcrypto.num @@ -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: