diff options
| author | schwarze <> | 2016-11-03 09:35:34 +0000 |
|---|---|---|
| committer | schwarze <> | 2016-11-03 09:35:34 +0000 |
| commit | 4d607f17ea3eb38ed9f7703afd423f6055c686d4 (patch) | |
| tree | 58d82d0d7f6aeee380eaadbcfaa231ecbe6b90a0 /src/lib/libcrypto/doc/EVP_DigestSignInit.pod | |
| parent | cf67afe5881727d740e9f6c772aa478123f7d698 (diff) | |
| download | openbsd-4d607f17ea3eb38ed9f7703afd423f6055c686d4.tar.gz openbsd-4d607f17ea3eb38ed9f7703afd423f6055c686d4.tar.bz2 openbsd-4d607f17ea3eb38ed9f7703afd423f6055c686d4.zip | |
convert EVP manuals from pod to mdoc
Diffstat (limited to 'src/lib/libcrypto/doc/EVP_DigestSignInit.pod')
| -rw-r--r-- | src/lib/libcrypto/doc/EVP_DigestSignInit.pod | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/src/lib/libcrypto/doc/EVP_DigestSignInit.pod b/src/lib/libcrypto/doc/EVP_DigestSignInit.pod deleted file mode 100644 index 00205d2ae9..0000000000 --- a/src/lib/libcrypto/doc/EVP_DigestSignInit.pod +++ /dev/null | |||
| @@ -1,85 +0,0 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | EVP_DigestSignInit, EVP_DigestSignUpdate, EVP_DigestSignFinal - EVP signing | ||
| 6 | functions | ||
| 7 | |||
| 8 | =head1 SYNOPSIS | ||
| 9 | |||
| 10 | #include <openssl/evp.h> | ||
| 11 | |||
| 12 | int EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, | ||
| 13 | const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey); | ||
| 14 | int EVP_DigestSignUpdate(EVP_MD_CTX *ctx, const void *d, unsigned int cnt); | ||
| 15 | int EVP_DigestSignFinal(EVP_MD_CTX *ctx, unsigned char *sig, size_t *siglen); | ||
| 16 | |||
| 17 | =head1 DESCRIPTION | ||
| 18 | |||
| 19 | The EVP signature routines are a high level interface to digital signatures. | ||
| 20 | |||
| 21 | EVP_DigestSignInit() sets up signing context B<ctx> to use digest B<type> from | ||
| 22 | ENGINE B<impl> and private key B<pkey>. B<ctx> must be initialized with | ||
| 23 | EVP_MD_CTX_init() before calling this function. If B<pctx> is not NULL the | ||
| 24 | EVP_PKEY_CTX of the signing operation will be written to B<*pctx>: this can | ||
| 25 | be used to set alternative signing options. | ||
| 26 | |||
| 27 | EVP_DigestSignUpdate() hashes B<cnt> bytes of data at B<d> into the | ||
| 28 | signature context B<ctx>. This function can be called several times on the | ||
| 29 | same B<ctx> to include additional data. This function is currently implemented | ||
| 30 | using a macro. | ||
| 31 | |||
| 32 | EVP_DigestSignFinal() signs the data in B<ctx> places the signature in B<sig>. | ||
| 33 | If B<sig> is B<NULL> then the maximum size of the output buffer is written to | ||
| 34 | the B<siglen> parameter. If B<sig> is not B<NULL> then before the call the | ||
| 35 | B<siglen> parameter should contain the length of the B<sig> buffer, if the | ||
| 36 | call is successful the signature is written to B<sig> and the amount of data | ||
| 37 | written to B<siglen>. | ||
| 38 | |||
| 39 | =head1 RETURN VALUES | ||
| 40 | |||
| 41 | EVP_DigestSignInit() EVP_DigestSignUpdate() and EVP_DigestSignaFinal() return | ||
| 42 | 1 for success and 0 or a negative value for failure. In particular a return | ||
| 43 | value of -2 indicates the operation is not supported by the public key | ||
| 44 | algorithm. | ||
| 45 | |||
| 46 | The error codes can be obtained from L<ERR_get_error(3)|ERR_get_error(3)>. | ||
| 47 | |||
| 48 | =head1 NOTES | ||
| 49 | |||
| 50 | The B<EVP> interface to digital signatures should almost always be used in | ||
| 51 | preference to the low level interfaces. This is because the code then becomes | ||
| 52 | transparent to the algorithm used and much more flexible. | ||
| 53 | |||
| 54 | In previous versions of OpenSSL there was a link between message digest types | ||
| 55 | and public key algorithms. This meant that "clone" digests such as EVP_dss1() | ||
| 56 | needed to be used to sign using SHA1 and DSA. This is no longer necessary and | ||
| 57 | the use of clone digest is now discouraged. | ||
| 58 | |||
| 59 | The call to EVP_DigestSignFinal() internally finalizes a copy of the digest | ||
| 60 | context. This means that calls to EVP_DigestSignUpdate() and | ||
| 61 | EVP_DigestSignFinal() can be called later to digest and sign additional data. | ||
| 62 | |||
| 63 | Since only a copy of the digest context is ever finalized the context must | ||
| 64 | be cleaned up after use by calling EVP_MD_CTX_cleanup() or a memory leak | ||
| 65 | will occur. | ||
| 66 | |||
| 67 | The use of EVP_PKEY_size() with these functions is discouraged because some | ||
| 68 | signature operations may have a signature length which depends on the | ||
| 69 | parameters set. As a result EVP_PKEY_size() would have to return a value | ||
| 70 | which indicates the maximum possible signature for any set of parameters. | ||
| 71 | |||
| 72 | =head1 SEE ALSO | ||
| 73 | |||
| 74 | L<EVP_DigestVerifyInit(3)|EVP_DigestVerifyInit(3)>, | ||
| 75 | L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<err(3)|err(3)>, | ||
| 76 | L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, | ||
| 77 | L<md5(3)|md5(3)>, L<ripemd(3)|ripemd(3)>, | ||
| 78 | L<sha(3)|sha(3)>, L<dgst(1)|dgst(1)> | ||
| 79 | |||
| 80 | =head1 HISTORY | ||
| 81 | |||
| 82 | EVP_DigestSignInit(), EVP_DigestSignUpdate() and EVP_DigestSignFinal() | ||
| 83 | were first added to OpenSSL 1.0.0. | ||
| 84 | |||
| 85 | =cut | ||
