summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/doc/EVP_DigestVerifyInit.pod
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/doc/EVP_DigestVerifyInit.pod')
-rw-r--r--src/lib/libcrypto/doc/EVP_DigestVerifyInit.pod80
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
5EVP_DigestVerifyInit, EVP_DigestVerifyUpdate, EVP_DigestVerifyFinal - EVP
6signature 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
19The EVP signature routines are a high level interface to digital signatures.
20
21EVP_DigestVerifyInit() sets up verification context B<ctx> to use digest
22B<type> from ENGINE B<impl> and public key B<pkey>. B<ctx> must be initialized
23with EVP_MD_CTX_init() before calling this function. If B<pctx> is not NULL the
24EVP_PKEY_CTX of the verification operation will be written to B<*pctx>: this
25can be used to set alternative verification options.
26
27EVP_DigestVerifyUpdate() hashes B<cnt> bytes of data at B<d> into the
28verification context B<ctx>. This function can be called several times on the
29same B<ctx> to include additional data. This function is currently implemented
30using a macro.
31
32EVP_DigestVerifyFinal() verifies the data in B<ctx> against the signature in
33B<sig> of length B<siglen>.
34
35=head1 RETURN VALUES
36
37EVP_DigestVerifyInit() and EVP_DigestVerifyUpdate() return 1 for success and 0
38or a negative value for failure. In particular a return value of -2 indicates
39the operation is not supported by the public key algorithm.
40
41Unlike other functions the return value 0 from EVP_DigestVerifyFinal() only
42indicates that the signature did not verify successfully (that is tbs did
43not match the original data or the signature was of invalid form) it is not an
44indication of a more serious error.
45
46The error codes can be obtained from L<ERR_get_error(3)|ERR_get_error(3)>.
47
48=head1 NOTES
49
50The B<EVP> interface to digital signatures should almost always be used in
51preference to the low level interfaces. This is because the code then becomes
52transparent to the algorithm used and much more flexible.
53
54In previous versions of OpenSSL there was a link between message digest types
55and public key algorithms. This meant that "clone" digests such as EVP_dss1()
56needed to be used to sign using SHA1 and DSA. This is no longer necessary and
57the use of clone digest is now discouraged.
58
59The call to EVP_DigestVerifyFinal() internally finalizes a copy of the digest
60context. This means that calls to EVP_VerifyUpdate() and EVP_VerifyFinal() can
61be called later to digest and verify additional data.
62
63Since only a copy of the digest context is ever finalized the context must
64be cleaned up after use by calling EVP_MD_CTX_cleanup() or a memory leak
65will occur.
66
67=head1 SEE ALSO
68
69L<EVP_DigestSignInit(3)|EVP_DigestSignInit(3)>,
70L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<err(3)|err(3)>,
71L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>,
72L<md5(3)|md5(3)>, L<ripemd(3)|ripemd(3)>,
73L<sha(3)|sha(3)>, L<dgst(1)|dgst(1)>
74
75=head1 HISTORY
76
77EVP_DigestVerifyInit(), EVP_DigestVerifyUpdate() and EVP_DigestVerifyFinal()
78were first added to OpenSSL 1.0.0.
79
80=cut