diff options
-rw-r--r-- | doc/man3/OSSL_PARAM.pod | 6 | ||||
-rw-r--r-- | doc/man3/OSSL_PROVIDER.pod | 13 | ||||
-rw-r--r-- | doc/man7/provider-base.pod | 6 | ||||
-rw-r--r-- | include/openssl/core_names.h | 6 |
4 files changed, 17 insertions, 14 deletions
diff --git a/doc/man3/OSSL_PARAM.pod b/doc/man3/OSSL_PARAM.pod index f335d6f2c8..2f24d6e74d 100644 --- a/doc/man3/OSSL_PARAM.pod +++ b/doc/man3/OSSL_PARAM.pod @@ -309,8 +309,8 @@ This example is for setting parameters on some object: size_t foo_l = strlen(foo); const char bar[] = "some other string"; OSSL_PARAM set[] = { - { "foo", OSSL_PARAM_UTF8_STRING_PTR, &foo, foo_l, 0 }, - { "bar", OSSL_PARAM_UTF8_STRING, &bar, sizeof(bar) - 1, 0 }, + { "foo", OSSL_PARAM_UTF8_PTR, &foo, foo_l, 0 }, + { "bar", OSSL_PARAM_UTF8_STRING, (void *)&bar, sizeof(bar) - 1, 0 }, { NULL, 0, NULL, 0, 0 } }; @@ -323,7 +323,7 @@ This example is for requesting parameters on some object: char bar[1024]; size_t bar_l; OSSL_PARAM request[] = { - { "foo", OSSL_PARAM_UTF8_STRING_PTR, &foo, 0 /*irrelevant*/, 0 }, + { "foo", OSSL_PARAM_UTF8_PTR, &foo, 0 /*irrelevant*/, 0 }, { "bar", OSSL_PARAM_UTF8_STRING, &bar, sizeof(bar), 0 }, { NULL, 0, NULL, 0, 0 } }; diff --git a/doc/man3/OSSL_PROVIDER.pod b/doc/man3/OSSL_PROVIDER.pod index bc4cc1641e..7be2e9a5df 100644 --- a/doc/man3/OSSL_PROVIDER.pod +++ b/doc/man3/OSSL_PROVIDER.pod @@ -184,19 +184,22 @@ OSSL_PROVIDER_self_test() returns 1 if the self tests pass, or 0 on error. =head1 EXAMPLES This demonstrates how to load the provider module "foo" and ask for -its build number. +its build information. + + #include <openssl/params.h> + #include <openssl/provider.h> + #include <openssl/err.h> OSSL_PROVIDER *prov = NULL; const char *build = NULL; - size_t built_l = 0; OSSL_PARAM request[] = { - { "build", OSSL_PARAM_UTF8_STRING_PTR, &build, 0, &build_l }, - { NULL, 0, NULL, 0, NULL } + { "buildinfo", OSSL_PARAM_UTF8_PTR, &build, 0, 0 }, + { NULL, 0, NULL, 0, 0 } }; if ((prov = OSSL_PROVIDER_load(NULL, "foo")) != NULL && OSSL_PROVIDER_get_params(prov, request)) - printf("Provider 'foo' build %s\n", build); + printf("Provider 'foo' buildinfo: %s\n", build); else ERR_print_errors_fp(stderr); diff --git a/doc/man7/provider-base.pod b/doc/man7/provider-base.pod index 2696cf7195..3da935b905 100644 --- a/doc/man7/provider-base.pod +++ b/doc/man7/provider-base.pod @@ -418,17 +418,17 @@ provider_get_params() can return the following provider parameters to the core: =over 4 -=item "name" (B<OSSL_PROV_PARAM_NAME>) <UTF8 string ptr> +=item "name" (B<OSSL_PROV_PARAM_NAME>) <UTF8 ptr> This points to a string that should give a unique name for the provider. -=item "version" (B<OSSL_PROV_PARAM_VERSION>) <UTF8 string ptr> +=item "version" (B<OSSL_PROV_PARAM_VERSION>) <UTF8 ptr> This points to a string that is a version number associated with this provider. OpenSSL in-built providers use OPENSSL_VERSION_STR, but this may be different for any third party provider. This string is for informational purposes only. -=item "buildinfo" (B<OSSL_PROV_PARAM_BUILDINFO>) <UTF8 string ptr> +=item "buildinfo" (B<OSSL_PROV_PARAM_BUILDINFO>) <UTF8 ptr> This points to a string that is a build information associated with this provider. OpenSSL in-built providers use OPENSSL_FULL_VERSION_STR, but this may be diff --git a/include/openssl/core_names.h b/include/openssl/core_names.h index b549dae916..eed7480c9c 100644 --- a/include/openssl/core_names.h +++ b/include/openssl/core_names.h @@ -21,9 +21,9 @@ extern "C" { #define OSSL_PROV_PARAM_CORE_MODULE_FILENAME "module-filename" /* utf8_ptr */ /* Well known parameter names that Providers can define */ -#define OSSL_PROV_PARAM_NAME "name" /* utf8_string */ -#define OSSL_PROV_PARAM_VERSION "version" /* utf8_string */ -#define OSSL_PROV_PARAM_BUILDINFO "buildinfo" /* utf8_string */ +#define OSSL_PROV_PARAM_NAME "name" /* utf8_ptr */ +#define OSSL_PROV_PARAM_VERSION "version" /* utf8_ptr */ +#define OSSL_PROV_PARAM_BUILDINFO "buildinfo" /* utf8_ptr */ #define OSSL_PROV_PARAM_STATUS "status" /* uint */ #define OSSL_PROV_PARAM_SECURITY_CHECKS "security-checks" /* uint */ |