summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMichael Baentsch <57787676+baentsch@users.noreply.github.com>2022-06-07 08:28:26 +0200
committerTomas Mraz <tomas@openssl.org>2022-06-16 15:36:23 +0200
commit809526a06c1305d67a8f231ca15cd27ec800efce (patch)
tree0b3868e82711f9e59cc18ed1e1eb294086513488 /doc
parent6d702cebfce3ffd9d8c0cb2af80a987d3288e7a3 (diff)
Fix for OSSL_PARAM sample code referencing OSSL_PARAM_UTF8_PTR
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18490)
Diffstat (limited to 'doc')
-rw-r--r--doc/man3/OSSL_PARAM.pod6
-rw-r--r--doc/man3/OSSL_PROVIDER.pod13
-rw-r--r--doc/man7/provider-base.pod6
3 files changed, 14 insertions, 11 deletions
diff --git a/doc/man3/OSSL_PARAM.pod b/doc/man3/OSSL_PARAM.pod
index 1368a679b1..db669c28ea 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 3bbab816f9..af8baf6dc9 100644
--- a/doc/man7/provider-base.pod
+++ b/doc/man7/provider-base.pod
@@ -416,17 +416,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