summaryrefslogtreecommitdiffstats
path: root/secure/lib/libcrypto/man/EVP_SignInit.3
diff options
context:
space:
mode:
Diffstat (limited to 'secure/lib/libcrypto/man/EVP_SignInit.3')
-rw-r--r--secure/lib/libcrypto/man/EVP_SignInit.344
1 files changed, 28 insertions, 16 deletions
diff --git a/secure/lib/libcrypto/man/EVP_SignInit.3 b/secure/lib/libcrypto/man/EVP_SignInit.3
index 3644176..88a56a0 100644
--- a/secure/lib/libcrypto/man/EVP_SignInit.3
+++ b/secure/lib/libcrypto/man/EVP_SignInit.3
@@ -1,5 +1,5 @@
.\" Automatically generated by Pod::Man version 1.15
-.\" Tue Jul 30 09:21:43 2002
+.\" Mon Jan 13 19:28:10 2003
.\"
.\" Standard preamble:
.\" ======================================================================
@@ -138,7 +138,7 @@
.\" ======================================================================
.\"
.IX Title "EVP_SignInit 3"
-.TH EVP_SignInit 3 "0.9.6e" "2002-07-30" "OpenSSL"
+.TH EVP_SignInit 3 "0.9.7" "2003-01-13" "OpenSSL"
.UC
.SH "NAME"
EVP_SignInit, EVP_SignUpdate, EVP_SignFinal \- \s-1EVP\s0 signing functions
@@ -148,11 +148,14 @@ EVP_SignInit, EVP_SignUpdate, EVP_SignFinal \- \s-1EVP\s0 signing functions
\& #include <openssl/evp.h>
.Ve
.Vb 3
-\& void EVP_SignInit(EVP_MD_CTX *ctx, const EVP_MD *type);
-\& void EVP_SignUpdate(EVP_MD_CTX *ctx, const void *d, unsigned int cnt);
+\& int EVP_SignInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl);
+\& int EVP_SignUpdate(EVP_MD_CTX *ctx, const void *d, unsigned int cnt);
\& int EVP_SignFinal(EVP_MD_CTX *ctx,unsigned char *sig,unsigned int *s, EVP_PKEY *pkey);
.Ve
.Vb 1
+\& void EVP_SignInit(EVP_MD_CTX *ctx, const EVP_MD *type);
+.Ve
+.Vb 1
\& int EVP_PKEY_size(EVP_PKEY *pkey);
.Ve
.SH "DESCRIPTION"
@@ -160,9 +163,9 @@ EVP_SignInit, EVP_SignUpdate, EVP_SignFinal \- \s-1EVP\s0 signing functions
The \s-1EVP\s0 signature routines are a high level interface to digital
signatures.
.PP
-\&\fIEVP_SignInit()\fR initializes a signing context \fBctx\fR to using digest
-\&\fBtype\fR: this will typically be supplied by a function such as
-\&\fIEVP_sha1()\fR.
+\&\fIEVP_SignInit_ex()\fR sets up signing context \fBctx\fR to use digest
+\&\fBtype\fR from \s-1ENGINE\s0 \fBimpl\fR. \fBctx\fR must be initialized with
+\&\fIEVP_MD_CTX_init()\fR before calling this function.
.PP
\&\fIEVP_SignUpdate()\fR hashes \fBcnt\fR bytes of data at \fBd\fR into the
signature context \fBctx\fR. This function can be called several times on the
@@ -172,17 +175,17 @@ same \fBctx\fR to include additional data.
and places the signature in \fBsig\fR. If the \fBs\fR parameter is not \s-1NULL\s0
then the number of bytes of data written (i.e. the length of the signature)
will be written to the integer at \fBs\fR, at most EVP_PKEY_size(pkey) bytes
-will be written. After calling \fIEVP_SignFinal()\fR no additional calls to
-\&\fIEVP_SignUpdate()\fR can be made, but \fIEVP_SignInit()\fR can be called to initialize
-a new signature operation.
+will be written.
+.PP
+\&\fIEVP_SignInit()\fR initializes a signing context \fBctx\fR to use the default
+implementation of digest \fBtype\fR.
.PP
\&\fIEVP_PKEY_size()\fR returns the maximum size of a signature in bytes. The actual
signature returned by \fIEVP_SignFinal()\fR may be smaller.
.SH "RETURN VALUES"
.IX Header "RETURN VALUES"
-\&\fIEVP_SignInit()\fR and \fIEVP_SignUpdate()\fR do not return values.
-.PP
-\&\fIEVP_SignFinal()\fR returns 1 for success and 0 for failure.
+\&\fIEVP_SignInit_ex()\fR, \fIEVP_SignUpdate()\fR and \fIEVP_SignFinal()\fR return 1
+for success and 0 for failure.
.PP
\&\fIEVP_PKEY_size()\fR returns the maximum size of a signature in bytes.
.PP
@@ -201,11 +204,18 @@ EVP_DigestInit(3).
When signing with \s-1DSA\s0 private keys the random number generator must be seeded
or the operation will fail. The random number generator does not need to be
seeded for \s-1RSA\s0 signatures.
+.PP
+The call to \fIEVP_SignFinal()\fR internally finalizes a copy of the digest context.
+This means that calls to \fIEVP_SignUpdate()\fR and \fIEVP_SignFinal()\fR can be called
+later to digest and sign additional data.
+.PP
+Since only a copy of the digest context is ever finalized the context must
+be cleaned up after use by calling \fIEVP_MD_CTX_cleanup()\fR or a memory leak
+will occur.
.SH "BUGS"
.IX Header "BUGS"
-Several of the functions do not return values: maybe they should. Although the
-internal digest operations will never fail some future hardware based operations
-might.
+Older versions of this documentation wrongly stated that calls to
+\&\fIEVP_SignUpdate()\fR could not be made after calling \fIEVP_SignFinal()\fR.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
EVP_VerifyInit(3),
@@ -217,3 +227,5 @@ sha(3), dgst(1)
.IX Header "HISTORY"
\&\fIEVP_SignInit()\fR, \fIEVP_SignUpdate()\fR and \fIEVP_SignFinal()\fR are
available in all versions of SSLeay and OpenSSL.
+.PP
+\&\fIEVP_SignInit_ex()\fR was added in OpenSSL 0.9.7.
OpenPOWER on IntegriCloud