X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=doc%2Fman3%2FEVP_PKEY_sign.pod;h=68788921da675206a755d9a9e2d08dcdf19d1791;hp=eec782fc090d7abb01fbcb3504dd18326e3bedfd;hb=0e52100400e647aeb5b8ac1b92c74d53918d39a0;hpb=2947af32a0ec6666efd5b287ac4609ba3a984f0d;ds=sidebyside diff --git a/doc/man3/EVP_PKEY_sign.pod b/doc/man3/EVP_PKEY_sign.pod index eec782fc09..68788921da 100644 --- a/doc/man3/EVP_PKEY_sign.pod +++ b/doc/man3/EVP_PKEY_sign.pod @@ -2,7 +2,8 @@ =head1 NAME -EVP_PKEY_sign_init, EVP_PKEY_sign - sign using a public key algorithm +EVP_PKEY_sign_init, EVP_PKEY_sign +- sign using a public key algorithm =head1 SYNOPSIS @@ -10,21 +11,24 @@ EVP_PKEY_sign_init, EVP_PKEY_sign - sign using a public key algorithm int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx); int EVP_PKEY_sign(EVP_PKEY_CTX *ctx, - unsigned char *sig, size_t *siglen, - const unsigned char *tbs, size_t tbslen); + unsigned char *sig, size_t *siglen, + const unsigned char *tbs, size_t tbslen); =head1 DESCRIPTION -The EVP_PKEY_sign_init() function initializes a public key algorithm -context using key B for a signing operation. +EVP_PKEY_sign_init() initializes a public key algorithm context I for +signing using the algorithm given when the context was created +using L or variants thereof. The algorithm is used to +fetch a B method implicitly, see L +for more information about implict fetches. The EVP_PKEY_sign() function performs a public key signing operation -using B. The data to be signed is specified using the B and -B parameters. If B is B then the maximum size of the output -buffer is written to the B parameter. If B is not B then -before the call the B parameter should contain the length of the -B buffer, if the call is successful the signature is written to -B and the amount of data written to B. +using I. The data to be signed is specified using the I and +I parameters. If I is NULL then the maximum size of the output +buffer is written to the I parameter. If I is not NULL then +before the call the I parameter should contain the length of the +I buffer, if the call is successful the signature is written to +I and the amount of data written to I. =head1 NOTES @@ -46,7 +50,7 @@ EVP_PKEY_sign_init() and EVP_PKEY_sign() return 1 for success and 0 or a negative value for failure. In particular a return value of -2 indicates the operation is not supported by the public key algorithm. -=head1 EXAMPLE +=head1 EXAMPLES Sign data using RSA with PKCS#1 padding and SHA256 digest: @@ -101,13 +105,14 @@ L =head1 HISTORY -These functions were first added to OpenSSL 1.0.0. +EVP_PKEY_sign_init_ex() was added in OpenSSL 3.0. +These functions were added in OpenSSL 1.0.0. =head1 COPYRIGHT Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved. -Licensed under the OpenSSL license (the "License"). You may not use +Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at L.