[openssl] master update
Richard Levitte
levitte at openssl.org
Tue Jan 26 14:58:46 UTC 2021
The branch master has been updated
via 1395a84e48e1369939ff47ca54163a210a0de4e8 (commit)
from df7858989350e600b81aeb7178a55ea3ac3ead41 (commit)
- Log -----------------------------------------------------------------
commit 1395a84e48e1369939ff47ca54163a210a0de4e8
Author: Daiki Ueno <dueno at redhat.com>
Date: Sun Jan 24 17:45:57 2021 +0100
params: OSSL_PARAM_utf8_ptr: don't automatically reference `address`
Since the pointer can be later be modified, the caller should have the
responsibility to supply the address of that.
Signed-off-by: Daiki Ueno <dueno at redhat.com>
Reviewed-by: Dmitry Belyavskiy <beldmit at gmail.com>
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13951)
-----------------------------------------------------------------------
Summary of changes:
doc/man3/OSSL_PARAM_int.pod | 4 ++--
include/openssl/params.h | 4 ++--
providers/fips/fipsprov.c | 14 +++++++-------
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/doc/man3/OSSL_PARAM_int.pod b/doc/man3/OSSL_PARAM_int.pod
index ebb5e8ecb8..2bc2cc0dfc 100644
--- a/doc/man3/OSSL_PARAM_int.pod
+++ b/doc/man3/OSSL_PARAM_int.pod
@@ -337,7 +337,7 @@ This example is for setting parameters on some object:
size_t foo_l = strlen(foo) + 1;
const char bar[] = "some other string";
const OSSL_PARAM set[] = {
- OSSL_PARAM_utf8_ptr("foo", foo, foo_l),
+ OSSL_PARAM_utf8_ptr("foo", &foo, foo_l),
OSSL_PARAM_utf8_string("bar", bar, sizeof(bar)),
OSSL_PARAM_END
};
@@ -351,7 +351,7 @@ available parameters:
const char *foo = NULL;
char bar[1024];
OSSL_PARAM request[] = {
- OSSL_PARAM_utf8_ptr("foo", foo, 0),
+ OSSL_PARAM_utf8_ptr("foo", &foo, 0),
OSSL_PARAM_utf8_string("bar", bar, sizeof(bar)),
OSSL_PARAM_END
};
diff --git a/include/openssl/params.h b/include/openssl/params.h
index 6ed7ecbb24..644d6253e8 100644
--- a/include/openssl/params.h
+++ b/include/openssl/params.h
@@ -62,9 +62,9 @@ extern "C" {
OSSL_PARAM_DEFN((key), OSSL_PARAM_OCTET_STRING, (addr), sz)
# define OSSL_PARAM_utf8_ptr(key, addr, sz) \
- OSSL_PARAM_DEFN((key), OSSL_PARAM_UTF8_PTR, &(addr), sz)
+ OSSL_PARAM_DEFN((key), OSSL_PARAM_UTF8_PTR, (addr), sz)
# define OSSL_PARAM_octet_ptr(key, addr, sz) \
- OSSL_PARAM_DEFN((key), OSSL_PARAM_OCTET_PTR, &(addr), sz)
+ OSSL_PARAM_DEFN((key), OSSL_PARAM_OCTET_PTR, (addr), sz)
/* Search an OSSL_PARAM array for a matching name */
OSSL_PARAM *OSSL_PARAM_locate(OSSL_PARAM *p, const char *key);
diff --git a/providers/fips/fipsprov.c b/providers/fips/fipsprov.c
index f59c2c1c91..990b69ef34 100644
--- a/providers/fips/fipsprov.c
+++ b/providers/fips/fipsprov.c
@@ -117,25 +117,25 @@ static const OSSL_PARAM fips_param_types[] = {
static OSSL_PARAM core_params[] =
{
OSSL_PARAM_utf8_ptr(OSSL_PROV_PARAM_CORE_MODULE_FILENAME,
- selftest_params.module_filename,
+ &selftest_params.module_filename,
sizeof(selftest_params.module_filename)),
OSSL_PARAM_utf8_ptr(OSSL_PROV_FIPS_PARAM_MODULE_MAC,
- selftest_params.module_checksum_data,
+ &selftest_params.module_checksum_data,
sizeof(selftest_params.module_checksum_data)),
OSSL_PARAM_utf8_ptr(OSSL_PROV_FIPS_PARAM_INSTALL_MAC,
- selftest_params.indicator_checksum_data,
+ &selftest_params.indicator_checksum_data,
sizeof(selftest_params.indicator_checksum_data)),
OSSL_PARAM_utf8_ptr(OSSL_PROV_FIPS_PARAM_INSTALL_STATUS,
- selftest_params.indicator_data,
+ &selftest_params.indicator_data,
sizeof(selftest_params.indicator_data)),
OSSL_PARAM_utf8_ptr(OSSL_PROV_FIPS_PARAM_INSTALL_VERSION,
- selftest_params.indicator_version,
+ &selftest_params.indicator_version,
sizeof(selftest_params.indicator_version)),
OSSL_PARAM_utf8_ptr(OSSL_PROV_FIPS_PARAM_CONDITIONAL_ERRORS,
- selftest_params.conditional_error_check,
+ &selftest_params.conditional_error_check,
sizeof(selftest_params.conditional_error_check)),
OSSL_PARAM_utf8_ptr(OSSL_PROV_FIPS_PARAM_SECURITY_CHECKS,
- fips_security_check_option,
+ &fips_security_check_option,
sizeof(fips_security_check_option)),
OSSL_PARAM_END
};
More information about the openssl-commits
mailing list