diff options
author | Pauli <paul.dale@oracle.com> | 2020-01-14 19:36:39 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2020-01-19 10:20:06 +1000 |
commit | ac23078b78305ba7b60d1459cf0db5df96e89d84 (patch) | |
tree | aa31103f40ca47125121661807b5059ab776cd09 /doc | |
parent | a978dc3bffb63e6bfc40fe6955e8798bdffb4e7e (diff) |
param_bld: add a padded BN call.
To aviod leaking size information when passing private value using the
OSSL_PARAM builder, a padded BN call is required.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10840)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/internal/man3/ossl_param_bld_init.pod | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/doc/internal/man3/ossl_param_bld_init.pod b/doc/internal/man3/ossl_param_bld_init.pod index 2fb7c4f359..545eaf1415 100644 --- a/doc/internal/man3/ossl_param_bld_init.pod +++ b/doc/internal/man3/ossl_param_bld_init.pod @@ -8,9 +8,9 @@ ossl_param_bld_push_long, ossl_param_bld_push_ulong, ossl_param_bld_push_int32, ossl_param_bld_push_uint32, ossl_param_bld_push_int64, ossl_param_bld_push_uint64, ossl_param_bld_push_size_t, ossl_param_bld_push_double, -ossl_param_bld_push_BN, ossl_param_bld_push_utf8_string, -ossl_param_bld_push_utf8_ptr, ossl_param_bld_push_octet_string, -ossl_param_bld_push_octet_ptr +ossl_param_bld_push_BN, ossl_param_bld_push_BN_pad, +ossl_param_bld_push_utf8_string, ossl_param_bld_push_utf8_ptr, +ossl_param_bld_push_octet_string, ossl_param_bld_push_octet_ptr - functions to assist in the creation of OSSL_PARAM arrays =head1 SYNOPSIS @@ -34,6 +34,8 @@ ossl_param_bld_push_octet_ptr int ossl_param_bld_push_BN(OSSL_PARAM_BLD *bld, const char *key, const BIGNUM *bn); + int ossl_param_bld_push_BN_pad(OSSL_PARAM_BLD *bld, const char *key, + const BIGNUM *bn, size_t sz); int ossl_param_bld_push_utf8_string(OSSL_PARAM_BLD *bld, const char *key, const char *buf, size_t bsize); @@ -90,6 +92,15 @@ will also be securely allocated. The I<bn> argument is stored by reference and the underlying BIGNUM object must exist until after ossl_param_bld_to_param() has been called. +ossl_param_bld_push_BN_pad() is a function that will create an OSSL_PARAM object +that holds the specified BIGNUM I<bn>. +The object will be padded to occupy exactly I<sz> bytes, if insufficient space +is specified an error results. +If I<bn> is marked as being securely allocated, it's OSSL_PARAM representation +will also be securely allocated. +The I<bn> argument is stored by reference and the underlying BIGNUM object +must exist until after ossl_param_bld_to_param() has been called. + ossl_param_bld_push_utf8_string() is a function that will create an OSSL_PARAM object that references the UTF8 string specified by I<buf>. If the length of the string, I<bsize>, is zero then it will be calculated. |