diff options
author | Roberto Hueso Gomez <roberto@robertohueso.org> | 2022-08-01 20:11:22 +0200 |
---|---|---|
committer | Nicola Tuveri <nic.tuv@gmail.com> | 2022-08-04 12:17:09 +0300 |
commit | fae06b5779bd3e2e1af22b370f32e60efb59fcd6 (patch) | |
tree | 58e721723a935eb7b78baa4f584254b5c61e1ceb /doc | |
parent | d93f154d5a524e6ed71ff276447de7fe11d85949 (diff) |
Fix EC_KEY_set_private_key() NULL priv_key docs
Updates the docs to describe EC_KEY_set_private_key() function behavior
when a NULL priv_key argument is passed.
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/18942)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/man3/EC_KEY_new.pod | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/doc/man3/EC_KEY_new.pod b/doc/man3/EC_KEY_new.pod index ce5f5e491f..98c9adc8ae 100644 --- a/doc/man3/EC_KEY_new.pod +++ b/doc/man3/EC_KEY_new.pod @@ -43,7 +43,7 @@ see L<openssl_user_macros(7)>: const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key); int EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group); const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key); - int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *prv); + int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *priv_key); const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key); int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub); point_conversion_form_t EC_KEY_get_conv_form(const EC_KEY *key); @@ -136,7 +136,9 @@ that it is valid. The functions EC_KEY_get0_group(), EC_KEY_set_group(), EC_KEY_get0_private_key(), EC_KEY_set_private_key(), EC_KEY_get0_public_key(), and EC_KEY_set_public_key() get and set the EC_GROUP object, the private key, -and the EC_POINT public key for the I<key> respectively. +and the EC_POINT public key for the B<key> respectively. The function +EC_KEY_set_private_key() accepts NULL as the priv_key argument to securely clear +the private key component from the EC_KEY. The functions EC_KEY_get_conv_form() and EC_KEY_set_conv_form() get and set the point_conversion_form for the I<key>. For a description of @@ -197,10 +199,14 @@ EC_KEY_copy() returns a pointer to the destination key, or NULL on error. EC_KEY_get0_engine() returns a pointer to an ENGINE, or NULL if it wasn't set. -EC_KEY_up_ref(), EC_KEY_set_group(), EC_KEY_set_private_key(), -EC_KEY_set_public_key(), EC_KEY_precompute_mult(), EC_KEY_generate_key(), -EC_KEY_check_key(), EC_KEY_set_public_key_affine_coordinates(), -EC_KEY_oct2key() and EC_KEY_oct2priv() return 1 on success or 0 on error. +EC_KEY_up_ref(), EC_KEY_set_group(), EC_KEY_set_public_key(), +EC_KEY_precompute_mult(), EC_KEY_generate_key(), EC_KEY_check_key(), +EC_KEY_set_public_key_affine_coordinates(), EC_KEY_oct2key() and +EC_KEY_oct2priv() return 1 on success or 0 on error. + +EC_KEY_set_private_key() returns 1 on success or 0 on error except when the +priv_key argument is NULL, in that case it returns 0, for legacy compatibility, +and should not be treated as an error. EC_KEY_get0_group() returns the EC_GROUP associated with the EC_KEY. |