summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/doc/EVP_DigestSignInit.pod
diff options
context:
space:
mode:
authorschwarze <>2016-11-03 09:35:34 +0000
committerschwarze <>2016-11-03 09:35:34 +0000
commit4d607f17ea3eb38ed9f7703afd423f6055c686d4 (patch)
tree58d82d0d7f6aeee380eaadbcfaa231ecbe6b90a0 /src/lib/libcrypto/doc/EVP_DigestSignInit.pod
parentcf67afe5881727d740e9f6c772aa478123f7d698 (diff)
downloadopenbsd-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.pod85
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
5EVP_DigestSignInit, EVP_DigestSignUpdate, EVP_DigestSignFinal - EVP signing
6functions
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
19The EVP signature routines are a high level interface to digital signatures.
20
21EVP_DigestSignInit() sets up signing context B<ctx> to use digest B<type> from
22ENGINE B<impl> and private key B<pkey>. B<ctx> must be initialized with
23EVP_MD_CTX_init() before calling this function. If B<pctx> is not NULL the
24EVP_PKEY_CTX of the signing operation will be written to B<*pctx>: this can
25be used to set alternative signing options.
26
27EVP_DigestSignUpdate() hashes B<cnt> bytes of data at B<d> into the
28signature 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_DigestSignFinal() signs the data in B<ctx> places the signature in B<sig>.
33If B<sig> is B<NULL> then the maximum size of the output buffer is written to
34the B<siglen> parameter. If B<sig> is not B<NULL> then before the call the
35B<siglen> parameter should contain the length of the B<sig> buffer, if the
36call is successful the signature is written to B<sig> and the amount of data
37written to B<siglen>.
38
39=head1 RETURN VALUES
40
41EVP_DigestSignInit() EVP_DigestSignUpdate() and EVP_DigestSignaFinal() return
421 for success and 0 or a negative value for failure. In particular a return
43value of -2 indicates the operation is not supported by the public key
44algorithm.
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_DigestSignFinal() internally finalizes a copy of the digest
60context. This means that calls to EVP_DigestSignUpdate() and
61EVP_DigestSignFinal() can be called later to digest and sign 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
67The use of EVP_PKEY_size() with these functions is discouraged because some
68signature operations may have a signature length which depends on the
69parameters set. As a result EVP_PKEY_size() would have to return a value
70which indicates the maximum possible signature for any set of parameters.
71
72=head1 SEE ALSO
73
74L<EVP_DigestVerifyInit(3)|EVP_DigestVerifyInit(3)>,
75L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<err(3)|err(3)>,
76L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>,
77L<md5(3)|md5(3)>, L<ripemd(3)|ripemd(3)>,
78L<sha(3)|sha(3)>, L<dgst(1)|dgst(1)>
79
80=head1 HISTORY
81
82EVP_DigestSignInit(), EVP_DigestSignUpdate() and EVP_DigestSignFinal()
83were first added to OpenSSL 1.0.0.
84
85=cut