diff options
author | Richard Levitte <levitte@openssl.org> | 2020-07-28 22:00:09 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-08-24 10:02:26 +0200 |
commit | ab00ddb55907317d6cece552d12ddf3263c01043 (patch) | |
tree | 8190173cf3aa3f5a5789dbc3993a2d580e69402e /util | |
parent | c4fc564d48456be622509886d3ea5618fce2a02e (diff) |
OSSL_PARAM: Add string pointer getters
When some function receives an OSSL_PARAM array to pilfer for data,
and there is a string of some sort, and all the code needs is to get
the pointer to the data, rather than a copy, there is currently no
other way than to use |param->data| directly. This is of course a
valid method, but lacks any safety check (is |param->data_type|
correct, for example?).
OSSL_PARAM_get_utf8_string_ptr() and OSSL_PARAM_get_octet_string_ptr()
helps the programmer with such things, by setting the argument pointer
to |param->data|.
Additionally, the handle the data types OSSL_PARAM_UTF8_PTR and
OSSL_PARAM_OCTET_PTR as well.
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12512)
Diffstat (limited to 'util')
-rw-r--r-- | util/libcrypto.num | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/util/libcrypto.num b/util/libcrypto.num index 575731b145..5cda5b3d8d 100644 --- a/util/libcrypto.num +++ b/util/libcrypto.num @@ -5281,3 +5281,5 @@ OSSL_STORE_LOADER_number ? 3_0_0 EXIST::FUNCTION: OSSL_STORE_LOADER_is_a ? 3_0_0 EXIST::FUNCTION: OSSL_STORE_LOADER_do_all_provided ? 3_0_0 EXIST::FUNCTION: OSSL_STORE_LOADER_names_do_all ? 3_0_0 EXIST::FUNCTION: +OSSL_PARAM_get_utf8_string_ptr ? 3_0_0 EXIST::FUNCTION: +OSSL_PARAM_get_octet_string_ptr ? 3_0_0 EXIST::FUNCTION: |