summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/doc/EVP_SignInit.pod
diff options
context:
space:
mode:
authorcvs2svn <admin@example.com>2002-09-26 11:41:23 +0000
committercvs2svn <admin@example.com>2002-09-26 11:41:23 +0000
commit3b5c5bfc7cdfc65c13061b8267f92cfc3c3d9f62 (patch)
tree65b4d250c712e6725dca113b306ae73f896475e1 /src/lib/libcrypto/doc/EVP_SignInit.pod
parentaf61e3f7dbe1fd8b363339d8ec5d6aec5f400ce3 (diff)
downloadopenbsd-OPENBSD_3_2_BASE.tar.gz
openbsd-OPENBSD_3_2_BASE.tar.bz2
openbsd-OPENBSD_3_2_BASE.zip
This commit was manufactured by cvs2git to create tag 'OPENBSD_3_2_BASE'.OPENBSD_3_2_BASE
Diffstat (limited to 'src/lib/libcrypto/doc/EVP_SignInit.pod')
-rw-r--r--src/lib/libcrypto/doc/EVP_SignInit.pod96
1 files changed, 0 insertions, 96 deletions
diff --git a/src/lib/libcrypto/doc/EVP_SignInit.pod b/src/lib/libcrypto/doc/EVP_SignInit.pod
deleted file mode 100644
index e65e54ce52..0000000000
--- a/src/lib/libcrypto/doc/EVP_SignInit.pod
+++ /dev/null
@@ -1,96 +0,0 @@
1=pod
2
3=head1 NAME
4
5EVP_SignInit, EVP_SignUpdate, EVP_SignFinal - EVP signing functions
6
7=head1 SYNOPSIS
8
9 #include <openssl/evp.h>
10
11 int EVP_SignInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl);
12 int EVP_SignUpdate(EVP_MD_CTX *ctx, const void *d, unsigned int cnt);
13 int EVP_SignFinal(EVP_MD_CTX *ctx,unsigned char *sig,unsigned int *s, EVP_PKEY *pkey);
14
15 void EVP_SignInit(EVP_MD_CTX *ctx, const EVP_MD *type);
16
17 int EVP_PKEY_size(EVP_PKEY *pkey);
18
19=head1 DESCRIPTION
20
21The EVP signature routines are a high level interface to digital
22signatures.
23
24EVP_SignInit_ex() sets up signing context B<ctx> to use digest
25B<type> from ENGINE B<impl>. B<ctx> must be initialized with
26EVP_MD_CTX_init() before calling this function.
27
28EVP_SignUpdate() hashes B<cnt> bytes of data at B<d> into the
29signature context B<ctx>. This function can be called several times on the
30same B<ctx> to include additional data.
31
32EVP_SignFinal() signs the data in B<ctx> using the private key B<pkey>
33and places the signature in B<sig>. If the B<s> parameter is not NULL
34then the number of bytes of data written (i.e. the length of the signature)
35will be written to the integer at B<s>, at most EVP_PKEY_size(pkey) bytes
36will be written.
37
38EVP_SignInit() initializes a signing context B<ctx> to use the default
39implementation of digest B<type>.
40
41EVP_PKEY_size() returns the maximum size of a signature in bytes. The actual
42signature returned by EVP_SignFinal() may be smaller.
43
44=head1 RETURN VALUES
45
46EVP_SignInit_ex(), EVP_SignUpdate() and EVP_SignFinal() return 1
47for success and 0 for failure.
48
49EVP_PKEY_size() returns the maximum size of a signature in bytes.
50
51The error codes can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>.
52
53=head1 NOTES
54
55The B<EVP> interface to digital signatures should almost always be used in
56preference to the low level interfaces. This is because the code then becomes
57transparent to the algorithm used and much more flexible.
58
59Due to the link between message digests and public key algorithms the correct
60digest algorithm must be used with the correct public key type. A list of
61algorithms and associated public key algorithms appears in
62L<EVP_DigestInit(3)|EVP_DigestInit(3)>.
63
64When signing with DSA private keys the random number generator must be seeded
65or the operation will fail. The random number generator does not need to be
66seeded for RSA signatures.
67
68The call to EVP_SignFinal() internally finalizes a copy of the digest context.
69This means that calls to EVP_SignUpdate() and EVP_SignFinal() can be called
70later to digest and sign additional data.
71
72Since only a copy of the digest context is ever finalized the context must
73be cleaned up after use by calling EVP_MD_CTX_cleanup() or a memory leak
74will occur.
75
76=head1 BUGS
77
78Older versions of this documentation wrongly stated that calls to
79EVP_SignUpdate() could not be made after calling EVP_SignFinal().
80
81=head1 SEE ALSO
82
83L<EVP_VerifyInit(3)|EVP_VerifyInit(3)>,
84L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<ERR_get_error(3)|ERR_get_error(3)>,
85L<evp(3)|evp(3)>, L<HMAC(3)|HMAC(3)>, L<MD2(3)|MD2(3)>,
86L<MD5(3)|MD5(3)>, L<MDC2(3)|MDC2(3)>, L<RIPEMD(3)|RIPEMD(3)>,
87L<SHA1(3)|SHA1(3)>, L<digest(1)|digest(1)>
88
89=head1 HISTORY
90
91EVP_SignInit(), EVP_SignUpdate() and EVP_SignFinal() are
92available in all versions of SSLeay and OpenSSL.
93
94EVP_SignInit_ex() was added in OpenSSL 0.9.7.
95
96=cut