diff options
author | Paul Yang <yang.yang@baishancloud.com> | 2018-09-05 15:19:17 +0800 |
---|---|---|
committer | Paul Yang <yang.yang@baishancloud.com> | 2018-09-07 18:12:26 +0800 |
commit | 675f4ceef880f9c4eb0fda5dacd18b001fefb5bc (patch) | |
tree | efd1f41c908f873f0567576005b3cab148a76b42 /doc/man3/EVP_PKEY_CTX_ctrl.pod | |
parent | a6c4cb845a031f09c6303a2c3452e253d0d01518 (diff) |
Update document for SM2 stuffs
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7113)
Diffstat (limited to 'doc/man3/EVP_PKEY_CTX_ctrl.pod')
-rw-r--r-- | doc/man3/EVP_PKEY_CTX_ctrl.pod | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/doc/man3/EVP_PKEY_CTX_ctrl.pod b/doc/man3/EVP_PKEY_CTX_ctrl.pod index 7eb9796bdd..d70dbb9cf2 100644 --- a/doc/man3/EVP_PKEY_CTX_ctrl.pod +++ b/doc/man3/EVP_PKEY_CTX_ctrl.pod @@ -17,7 +17,9 @@ EVP_PKEY_CTX_set_dh_paramgen_generator, EVP_PKEY_CTX_set_dh_pad, EVP_PKEY_CTX_set_dh_nid, EVP_PKEY_CTX_set_ec_paramgen_curve_nid, -EVP_PKEY_CTX_set_ec_param_enc - algorithm specific control operations +EVP_PKEY_CTX_set_ec_param_enc, +EVP_PKEY_CTX_set1_id, EVP_PKEY_CTX_get1_id, EVP_PKEY_CTX_get1_id_len +- algorithm specific control operations =head1 SYNOPSIS @@ -53,6 +55,10 @@ EVP_PKEY_CTX_set_ec_param_enc - algorithm specific control operations int EVP_PKEY_CTX_set_ec_paramgen_curve_nid(EVP_PKEY_CTX *ctx, int nid); int EVP_PKEY_CTX_set_ec_param_enc(EVP_PKEY_CTX *ctx, int param_enc); + int EVP_PKEY_CTX_set1_id(EVP_PKEY_CTX *ctx, void *id, size_t id_len); + int EVP_PKEY_CTX_get1_id(EVP_PKEY_CTX *ctx, void *id); + int EVP_PKEY_CTX_get1_id_len(EVP_PKEY_CTX *ctx, size_t *id_len); + =head1 DESCRIPTION The function EVP_PKEY_CTX_ctrl() sends a control operation to the context @@ -160,6 +166,17 @@ For maximum compatibility the named curve form should be used. Note: the B<OPENSSL_EC_NAMED_CURVE> value was only added to OpenSSL 1.1.0; previous versions should use 0 instead. +The EVP_PKEY_CTX_set1_id(), EVP_PKEY_CTX_get1_id() and EVP_PKEY_CTX_get1_id_len() +are used to manipulate special identifier field for specific signature algorithm +such as SM2. The EVP_PKEY_set1_id() sets an ID pointed by B<id> with the length +B<id_len> to the library. The library maintains the memory management stuffs so +the caller can safely free the original memory pointed by B<id>. The +EVP_PKEY_CTX_get1_id_len() returns the length of the ID set via a previous call +to EVP_PKEY_set1_id(). The length is usually used to allocate adequate memory for +further calls to EVP_PKEY_CTX_get1_id(). The EVP_PKEY_CTX_get1_id() returns the +previously set ID value to caller into B<id>, caller should allocate adequate +memory space to B<id> before calling EVP_PKEY_CTX_get1_id(). + =head1 RETURN VALUES EVP_PKEY_CTX_ctrl() and its macros return a positive value for success and 0 @@ -179,7 +196,8 @@ L<EVP_PKEY_keygen(3)> =head1 HISTORY -These functions were first added to OpenSSL 1.0.0. +EVP_PKEY_CTX_set1_id(), EVP_PKEY_CTX_get1_id() and EVP_PKEY_CTX_get1_id_len() +were added in 1.1.1, other functions were first added to OpenSSL 1.0.0. =head1 COPYRIGHT |