diff options
| author | schwarze <> | 2016-11-03 09:35:34 +0000 |
|---|---|---|
| committer | schwarze <> | 2016-11-03 09:35:34 +0000 |
| commit | ca3058f44f6c221a5580f274a8d643470f5ffa0a (patch) | |
| tree | 58d82d0d7f6aeee380eaadbcfaa231ecbe6b90a0 /src/lib/libcrypto/doc/EVP_DigestVerifyInit.pod | |
| parent | 13e48df1ecc456d07bff6a1552bb8ff8286b8b17 (diff) | |
| download | openbsd-ca3058f44f6c221a5580f274a8d643470f5ffa0a.tar.gz openbsd-ca3058f44f6c221a5580f274a8d643470f5ffa0a.tar.bz2 openbsd-ca3058f44f6c221a5580f274a8d643470f5ffa0a.zip | |
convert EVP manuals from pod to mdoc
Diffstat (limited to 'src/lib/libcrypto/doc/EVP_DigestVerifyInit.pod')
| -rw-r--r-- | src/lib/libcrypto/doc/EVP_DigestVerifyInit.pod | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/src/lib/libcrypto/doc/EVP_DigestVerifyInit.pod b/src/lib/libcrypto/doc/EVP_DigestVerifyInit.pod deleted file mode 100644 index 5dcfec1837..0000000000 --- a/src/lib/libcrypto/doc/EVP_DigestVerifyInit.pod +++ /dev/null | |||
| @@ -1,80 +0,0 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | EVP_DigestVerifyInit, EVP_DigestVerifyUpdate, EVP_DigestVerifyFinal - EVP | ||
| 6 | signature verification functions | ||
| 7 | |||
| 8 | =head1 SYNOPSIS | ||
| 9 | |||
| 10 | #include <openssl/evp.h> | ||
| 11 | |||
| 12 | int EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, | ||
| 13 | const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey); | ||
| 14 | int EVP_DigestVerifyUpdate(EVP_MD_CTX *ctx, const void *d, unsigned int cnt); | ||
| 15 | int EVP_DigestVerifyFinal(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_DigestVerifyInit() sets up verification context B<ctx> to use digest | ||
| 22 | B<type> from ENGINE B<impl> and public key B<pkey>. B<ctx> must be initialized | ||
| 23 | with EVP_MD_CTX_init() before calling this function. If B<pctx> is not NULL the | ||
| 24 | EVP_PKEY_CTX of the verification operation will be written to B<*pctx>: this | ||
| 25 | can be used to set alternative verification options. | ||
| 26 | |||
| 27 | EVP_DigestVerifyUpdate() hashes B<cnt> bytes of data at B<d> into the | ||
| 28 | verification 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_DigestVerifyFinal() verifies the data in B<ctx> against the signature in | ||
| 33 | B<sig> of length B<siglen>. | ||
| 34 | |||
| 35 | =head1 RETURN VALUES | ||
| 36 | |||
| 37 | EVP_DigestVerifyInit() and EVP_DigestVerifyUpdate() return 1 for success and 0 | ||
| 38 | or a negative value for failure. In particular a return value of -2 indicates | ||
| 39 | the operation is not supported by the public key algorithm. | ||
| 40 | |||
| 41 | Unlike other functions the return value 0 from EVP_DigestVerifyFinal() only | ||
| 42 | indicates that the signature did not verify successfully (that is tbs did | ||
| 43 | not match the original data or the signature was of invalid form) it is not an | ||
| 44 | indication of a more serious error. | ||
| 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_DigestVerifyFinal() internally finalizes a copy of the digest | ||
| 60 | context. This means that calls to EVP_VerifyUpdate() and EVP_VerifyFinal() can | ||
| 61 | be called later to digest and verify 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 | =head1 SEE ALSO | ||
| 68 | |||
| 69 | L<EVP_DigestSignInit(3)|EVP_DigestSignInit(3)>, | ||
| 70 | L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<err(3)|err(3)>, | ||
| 71 | L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, | ||
| 72 | L<md5(3)|md5(3)>, L<ripemd(3)|ripemd(3)>, | ||
| 73 | L<sha(3)|sha(3)>, L<dgst(1)|dgst(1)> | ||
| 74 | |||
| 75 | =head1 HISTORY | ||
| 76 | |||
| 77 | EVP_DigestVerifyInit(), EVP_DigestVerifyUpdate() and EVP_DigestVerifyFinal() | ||
| 78 | were first added to OpenSSL 1.0.0. | ||
| 79 | |||
| 80 | =cut | ||
