aboutsummaryrefslogtreecommitdiffstats
path: root/doc/man3/OSSL_PARAM_BLD.pod
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2021-11-25 18:46:32 +0100
committerRichard Levitte <levitte@openssl.org>2022-01-26 21:35:39 +0100
commit17898ec6011cc583c5af69ca8f25f5d165ff3e6a (patch)
tree6e56e81da933b0141b8ac7e9d243ee829a66bdf9 /doc/man3/OSSL_PARAM_BLD.pod
parentf1719858a05a9568ccbd052f160746cf4c027a9e (diff)
downloadopenssl-17898ec6011cc583c5af69ca8f25f5d165ff3e6a.tar.gz
Add support for signed BIGNUMs in the OSSL_PARAM_BLD API
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17162)
Diffstat (limited to 'doc/man3/OSSL_PARAM_BLD.pod')
-rw-r--r--doc/man3/OSSL_PARAM_BLD.pod17
1 files changed, 15 insertions, 2 deletions
diff --git a/doc/man3/OSSL_PARAM_BLD.pod b/doc/man3/OSSL_PARAM_BLD.pod
index 114ce44489..8393cf0e92 100644
--- a/doc/man3/OSSL_PARAM_BLD.pod
+++ b/doc/man3/OSSL_PARAM_BLD.pod
@@ -73,8 +73,16 @@ OSSL_PARAM objects of the specified size and correct type for the I<val>
argument.
I<val> is stored by value and an expression or auto variable can be used.
+When B<I<TYPE>> denotes an integer type, signed integer types will normally
+get the OSSL_PARAM type B<OSSL_PARAM_INTEGER> params.
+When B<I<TYPE>> denotes an unsigned integer type will get the OSSL_PARAM type
+B<OSSL_PARAM_UNSIGNED_INTEGER>.
+
OSSL_PARAM_BLD_push_BN() is a function that will create an OSSL_PARAM object
that holds the specified BIGNUM I<bn>.
+When the I<bn> is zero or positive, its OSSL_PARAM type becomes
+B<OSSL_PARAM_UNSIGNED_INTEGER>.
+When the I<bn> is negative, its OSSL_PARAM type becomes B<OSSL_PARAM_INTEGER>.
If I<bn> is marked as being securely allocated, its OSSL_PARAM representation
will also be securely allocated.
The I<bn> argument is stored by reference and the underlying BIGNUM object
@@ -84,6 +92,9 @@ 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.
+When the I<bn> is zero or positive, its OSSL_PARAM type becomes
+B<OSSL_PARAM_UNSIGNED_INTEGER>.
+When the I<bn> is negative, its OSSL_PARAM type becomes B<OSSL_PARAM_INTEGER>.
If I<bn> is marked as being securely allocated, its OSSL_PARAM representation
will also be securely allocated.
The I<bn> argument is stored by reference and the underlying BIGNUM object
@@ -126,8 +137,10 @@ on error.
=head1 NOTES
-OSSL_PARAM_BLD_push_BN() and OSSL_PARAM_BLD_push_BN_pad() currently only
-support nonnegative B<BIGNUM>s. They return an error on negative B<BIGNUM>s.
+OSSL_PARAM_BLD_push_BN() and OSSL_PARAM_BLD_push_BN_pad() only
+support nonnegative B<BIGNUM>s. They return an error on negative
+B<BIGNUM>s.
+To pass signed B<BIGNUM>s, use OSSL_PARAM_BLD_push_signed_BN().
=head1 EXAMPLES