summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/doc
diff options
context:
space:
mode:
authormiod <>2014-04-13 15:16:40 +0000
committermiod <>2014-04-13 15:16:40 +0000
commit52628ee3f51f011b463aaedb1a28aa0524b43cb3 (patch)
tree4bd2adeac981051908ec5756401424bbb4e57d6a /src/lib/libcrypto/doc
parent40c22d3625a3818690c889ed6216fedf2be522c9 (diff)
downloadopenbsd-52628ee3f51f011b463aaedb1a28aa0524b43cb3.tar.gz
openbsd-52628ee3f51f011b463aaedb1a28aa0524b43cb3.tar.bz2
openbsd-52628ee3f51f011b463aaedb1a28aa0524b43cb3.zip
Import OpenSSL 1.0.1g
Diffstat (limited to 'src/lib/libcrypto/doc')
-rw-r--r--src/lib/libcrypto/doc/ERR_get_error.pod7
-rw-r--r--src/lib/libcrypto/doc/EVP_BytesToKey.pod2
-rw-r--r--src/lib/libcrypto/doc/EVP_EncryptInit.pod2
-rw-r--r--src/lib/libcrypto/doc/EVP_PKEY_CTX_ctrl.pod2
-rw-r--r--src/lib/libcrypto/doc/EVP_PKEY_decrypt.pod2
-rw-r--r--src/lib/libcrypto/doc/EVP_PKEY_derive.pod2
-rw-r--r--src/lib/libcrypto/doc/EVP_PKEY_encrypt.pod2
-rw-r--r--src/lib/libcrypto/doc/EVP_PKEY_get_default_digest.pod2
-rw-r--r--src/lib/libcrypto/doc/EVP_PKEY_keygen.pod2
-rw-r--r--src/lib/libcrypto/doc/EVP_PKEY_sign.pod2
-rw-r--r--src/lib/libcrypto/doc/EVP_PKEY_verify.pod2
-rw-r--r--src/lib/libcrypto/doc/EVP_PKEY_verify_recover.pod103
-rw-r--r--src/lib/libcrypto/doc/X509_STORE_CTX_get_error.pod2
-rw-r--r--src/lib/libcrypto/doc/X509_VERIFY_PARAM_set_flags.pod2
14 files changed, 121 insertions, 13 deletions
diff --git a/src/lib/libcrypto/doc/ERR_get_error.pod b/src/lib/libcrypto/doc/ERR_get_error.pod
index 34443045fc..828ecf529b 100644
--- a/src/lib/libcrypto/doc/ERR_get_error.pod
+++ b/src/lib/libcrypto/doc/ERR_get_error.pod
@@ -52,8 +52,11 @@ ERR_get_error_line_data(), ERR_peek_error_line_data() and
52ERR_get_last_error_line_data() store additional data and flags 52ERR_get_last_error_line_data() store additional data and flags
53associated with the error code in *B<data> 53associated with the error code in *B<data>
54and *B<flags>, unless these are B<NULL>. *B<data> contains a string 54and *B<flags>, unless these are B<NULL>. *B<data> contains a string
55if *B<flags>&B<ERR_TXT_STRING>. If it has been allocated by OPENSSL_malloc(), 55if *B<flags>&B<ERR_TXT_STRING> is true.
56*B<flags>&B<ERR_TXT_MALLOCED> is true. 56
57An application B<MUST NOT> free the *B<data> pointer (or any other pointers
58returned by these functions) with OPENSSL_free() as freeing is handled
59automatically by the error library.
57 60
58=head1 RETURN VALUES 61=head1 RETURN VALUES
59 62
diff --git a/src/lib/libcrypto/doc/EVP_BytesToKey.pod b/src/lib/libcrypto/doc/EVP_BytesToKey.pod
index d375c46e03..0ea7d55c0f 100644
--- a/src/lib/libcrypto/doc/EVP_BytesToKey.pod
+++ b/src/lib/libcrypto/doc/EVP_BytesToKey.pod
@@ -17,7 +17,7 @@ EVP_BytesToKey - password based encryption routine
17 17
18EVP_BytesToKey() derives a key and IV from various parameters. B<type> is 18EVP_BytesToKey() derives a key and IV from various parameters. B<type> is
19the cipher to derive the key and IV for. B<md> is the message digest to use. 19the cipher to derive the key and IV for. B<md> is the message digest to use.
20The B<salt> paramter is used as a salt in the derivation: it should point to 20The B<salt> parameter is used as a salt in the derivation: it should point to
21an 8 byte buffer or NULL if no salt is used. B<data> is a buffer containing 21an 8 byte buffer or NULL if no salt is used. B<data> is a buffer containing
22B<datal> bytes which is used to derive the keying data. B<count> is the 22B<datal> bytes which is used to derive the keying data. B<count> is the
23iteration count to use. The derived key and IV will be written to B<key> 23iteration count to use. The derived key and IV will be written to B<key>
diff --git a/src/lib/libcrypto/doc/EVP_EncryptInit.pod b/src/lib/libcrypto/doc/EVP_EncryptInit.pod
index 8271d3dfc4..1c4bf184a1 100644
--- a/src/lib/libcrypto/doc/EVP_EncryptInit.pod
+++ b/src/lib/libcrypto/doc/EVP_EncryptInit.pod
@@ -152,7 +152,7 @@ does not remain in memory.
152 152
153EVP_EncryptInit(), EVP_DecryptInit() and EVP_CipherInit() behave in a 153EVP_EncryptInit(), EVP_DecryptInit() and EVP_CipherInit() behave in a
154similar way to EVP_EncryptInit_ex(), EVP_DecryptInit_ex and 154similar way to EVP_EncryptInit_ex(), EVP_DecryptInit_ex and
155EVP_CipherInit_ex() except the B<ctx> paramter does not need to be 155EVP_CipherInit_ex() except the B<ctx> parameter does not need to be
156initialized and they always use the default cipher implementation. 156initialized and they always use the default cipher implementation.
157 157
158EVP_EncryptFinal(), EVP_DecryptFinal() and EVP_CipherFinal() behave in a 158EVP_EncryptFinal(), EVP_DecryptFinal() and EVP_CipherFinal() behave in a
diff --git a/src/lib/libcrypto/doc/EVP_PKEY_CTX_ctrl.pod b/src/lib/libcrypto/doc/EVP_PKEY_CTX_ctrl.pod
index f2f455990f..13b91f1e6e 100644
--- a/src/lib/libcrypto/doc/EVP_PKEY_CTX_ctrl.pod
+++ b/src/lib/libcrypto/doc/EVP_PKEY_CTX_ctrl.pod
@@ -117,7 +117,7 @@ L<EVP_PKEY_encrypt(3)|EVP_PKEY_encrypt(3)>,
117L<EVP_PKEY_decrypt(3)|EVP_PKEY_decrypt(3)>, 117L<EVP_PKEY_decrypt(3)|EVP_PKEY_decrypt(3)>,
118L<EVP_PKEY_sign(3)|EVP_PKEY_sign(3)>, 118L<EVP_PKEY_sign(3)|EVP_PKEY_sign(3)>,
119L<EVP_PKEY_verify(3)|EVP_PKEY_verify(3)>, 119L<EVP_PKEY_verify(3)|EVP_PKEY_verify(3)>,
120L<EVP_PKEY_verifyrecover(3)|EVP_PKEY_verifyrecover(3)>, 120L<EVP_PKEY_verify_recover(3)|EVP_PKEY_verify_recover(3)>,
121L<EVP_PKEY_derive(3)|EVP_PKEY_derive(3)> 121L<EVP_PKEY_derive(3)|EVP_PKEY_derive(3)>
122L<EVP_PKEY_keygen(3)|EVP_PKEY_keygen(3)> 122L<EVP_PKEY_keygen(3)|EVP_PKEY_keygen(3)>
123 123
diff --git a/src/lib/libcrypto/doc/EVP_PKEY_decrypt.pod b/src/lib/libcrypto/doc/EVP_PKEY_decrypt.pod
index 42b2a8c44e..847983237b 100644
--- a/src/lib/libcrypto/doc/EVP_PKEY_decrypt.pod
+++ b/src/lib/libcrypto/doc/EVP_PKEY_decrypt.pod
@@ -83,7 +83,7 @@ L<EVP_PKEY_CTX_new(3)|EVP_PKEY_CTX_new(3)>,
83L<EVP_PKEY_encrypt(3)|EVP_PKEY_encrypt(3)>, 83L<EVP_PKEY_encrypt(3)|EVP_PKEY_encrypt(3)>,
84L<EVP_PKEY_sign(3)|EVP_PKEY_sign(3)>, 84L<EVP_PKEY_sign(3)|EVP_PKEY_sign(3)>,
85L<EVP_PKEY_verify(3)|EVP_PKEY_verify(3)>, 85L<EVP_PKEY_verify(3)|EVP_PKEY_verify(3)>,
86L<EVP_PKEY_verifyrecover(3)|EVP_PKEY_verifyrecover(3)>, 86L<EVP_PKEY_verify_recover(3)|EVP_PKEY_verify_recover(3)>,
87L<EVP_PKEY_derive(3)|EVP_PKEY_derive(3)> 87L<EVP_PKEY_derive(3)|EVP_PKEY_derive(3)>
88 88
89=head1 HISTORY 89=head1 HISTORY
diff --git a/src/lib/libcrypto/doc/EVP_PKEY_derive.pod b/src/lib/libcrypto/doc/EVP_PKEY_derive.pod
index d9d6d76c72..27464be571 100644
--- a/src/lib/libcrypto/doc/EVP_PKEY_derive.pod
+++ b/src/lib/libcrypto/doc/EVP_PKEY_derive.pod
@@ -84,7 +84,7 @@ L<EVP_PKEY_encrypt(3)|EVP_PKEY_encrypt(3)>,
84L<EVP_PKEY_decrypt(3)|EVP_PKEY_decrypt(3)>, 84L<EVP_PKEY_decrypt(3)|EVP_PKEY_decrypt(3)>,
85L<EVP_PKEY_sign(3)|EVP_PKEY_sign(3)>, 85L<EVP_PKEY_sign(3)|EVP_PKEY_sign(3)>,
86L<EVP_PKEY_verify(3)|EVP_PKEY_verify(3)>, 86L<EVP_PKEY_verify(3)|EVP_PKEY_verify(3)>,
87L<EVP_PKEY_verifyrecover(3)|EVP_PKEY_verifyrecover(3)>, 87L<EVP_PKEY_verify_recover(3)|EVP_PKEY_verify_recover(3)>,
88 88
89=head1 HISTORY 89=head1 HISTORY
90 90
diff --git a/src/lib/libcrypto/doc/EVP_PKEY_encrypt.pod b/src/lib/libcrypto/doc/EVP_PKEY_encrypt.pod
index 91c9c5d0a5..e495a81242 100644
--- a/src/lib/libcrypto/doc/EVP_PKEY_encrypt.pod
+++ b/src/lib/libcrypto/doc/EVP_PKEY_encrypt.pod
@@ -83,7 +83,7 @@ L<EVP_PKEY_CTX_new(3)|EVP_PKEY_CTX_new(3)>,
83L<EVP_PKEY_decrypt(3)|EVP_PKEY_decrypt(3)>, 83L<EVP_PKEY_decrypt(3)|EVP_PKEY_decrypt(3)>,
84L<EVP_PKEY_sign(3)|EVP_PKEY_sign(3)>, 84L<EVP_PKEY_sign(3)|EVP_PKEY_sign(3)>,
85L<EVP_PKEY_verify(3)|EVP_PKEY_verify(3)>, 85L<EVP_PKEY_verify(3)|EVP_PKEY_verify(3)>,
86L<EVP_PKEY_verifyrecover(3)|EVP_PKEY_verifyrecover(3)>, 86L<EVP_PKEY_verify_recover(3)|EVP_PKEY_verify_recover(3)>,
87L<EVP_PKEY_derive(3)|EVP_PKEY_derive(3)> 87L<EVP_PKEY_derive(3)|EVP_PKEY_derive(3)>
88 88
89=head1 HISTORY 89=head1 HISTORY
diff --git a/src/lib/libcrypto/doc/EVP_PKEY_get_default_digest.pod b/src/lib/libcrypto/doc/EVP_PKEY_get_default_digest.pod
index 1a9c7954c5..8ff597d44a 100644
--- a/src/lib/libcrypto/doc/EVP_PKEY_get_default_digest.pod
+++ b/src/lib/libcrypto/doc/EVP_PKEY_get_default_digest.pod
@@ -32,7 +32,7 @@ public key algorithm.
32L<EVP_PKEY_CTX_new(3)|EVP_PKEY_CTX_new(3)>, 32L<EVP_PKEY_CTX_new(3)|EVP_PKEY_CTX_new(3)>,
33L<EVP_PKEY_sign(3)|EVP_PKEY_sign(3)>, 33L<EVP_PKEY_sign(3)|EVP_PKEY_sign(3)>,
34L<EVP_PKEY_verify(3)|EVP_PKEY_verify(3)>, 34L<EVP_PKEY_verify(3)|EVP_PKEY_verify(3)>,
35L<EVP_PKEY_verifyrecover(3)|EVP_PKEY_verifyrecover(3)>, 35L<EVP_PKEY_verify_recover(3)|EVP_PKEY_verify_recover(3)>,
36 36
37=head1 HISTORY 37=head1 HISTORY
38 38
diff --git a/src/lib/libcrypto/doc/EVP_PKEY_keygen.pod b/src/lib/libcrypto/doc/EVP_PKEY_keygen.pod
index 37c6fe9503..fd431ace6d 100644
--- a/src/lib/libcrypto/doc/EVP_PKEY_keygen.pod
+++ b/src/lib/libcrypto/doc/EVP_PKEY_keygen.pod
@@ -151,7 +151,7 @@ L<EVP_PKEY_encrypt(3)|EVP_PKEY_encrypt(3)>,
151L<EVP_PKEY_decrypt(3)|EVP_PKEY_decrypt(3)>, 151L<EVP_PKEY_decrypt(3)|EVP_PKEY_decrypt(3)>,
152L<EVP_PKEY_sign(3)|EVP_PKEY_sign(3)>, 152L<EVP_PKEY_sign(3)|EVP_PKEY_sign(3)>,
153L<EVP_PKEY_verify(3)|EVP_PKEY_verify(3)>, 153L<EVP_PKEY_verify(3)|EVP_PKEY_verify(3)>,
154L<EVP_PKEY_verifyrecover(3)|EVP_PKEY_verifyrecover(3)>, 154L<EVP_PKEY_verify_recover(3)|EVP_PKEY_verify_recover(3)>,
155L<EVP_PKEY_derive(3)|EVP_PKEY_derive(3)> 155L<EVP_PKEY_derive(3)|EVP_PKEY_derive(3)>
156 156
157=head1 HISTORY 157=head1 HISTORY
diff --git a/src/lib/libcrypto/doc/EVP_PKEY_sign.pod b/src/lib/libcrypto/doc/EVP_PKEY_sign.pod
index 2fb52c3486..a044f2c131 100644
--- a/src/lib/libcrypto/doc/EVP_PKEY_sign.pod
+++ b/src/lib/libcrypto/doc/EVP_PKEY_sign.pod
@@ -86,7 +86,7 @@ L<EVP_PKEY_CTX_new(3)|EVP_PKEY_CTX_new(3)>,
86L<EVP_PKEY_encrypt(3)|EVP_PKEY_encrypt(3)>, 86L<EVP_PKEY_encrypt(3)|EVP_PKEY_encrypt(3)>,
87L<EVP_PKEY_decrypt(3)|EVP_PKEY_decrypt(3)>, 87L<EVP_PKEY_decrypt(3)|EVP_PKEY_decrypt(3)>,
88L<EVP_PKEY_verify(3)|EVP_PKEY_verify(3)>, 88L<EVP_PKEY_verify(3)|EVP_PKEY_verify(3)>,
89L<EVP_PKEY_verifyrecover(3)|EVP_PKEY_verifyrecover(3)>, 89L<EVP_PKEY_verify_recover(3)|EVP_PKEY_verify_recover(3)>,
90L<EVP_PKEY_derive(3)|EVP_PKEY_derive(3)> 90L<EVP_PKEY_derive(3)|EVP_PKEY_derive(3)>
91 91
92=head1 HISTORY 92=head1 HISTORY
diff --git a/src/lib/libcrypto/doc/EVP_PKEY_verify.pod b/src/lib/libcrypto/doc/EVP_PKEY_verify.pod
index f93e5fc6c3..90612ba2f0 100644
--- a/src/lib/libcrypto/doc/EVP_PKEY_verify.pod
+++ b/src/lib/libcrypto/doc/EVP_PKEY_verify.pod
@@ -81,7 +81,7 @@ L<EVP_PKEY_CTX_new(3)|EVP_PKEY_CTX_new(3)>,
81L<EVP_PKEY_encrypt(3)|EVP_PKEY_encrypt(3)>, 81L<EVP_PKEY_encrypt(3)|EVP_PKEY_encrypt(3)>,
82L<EVP_PKEY_decrypt(3)|EVP_PKEY_decrypt(3)>, 82L<EVP_PKEY_decrypt(3)|EVP_PKEY_decrypt(3)>,
83L<EVP_PKEY_sign(3)|EVP_PKEY_sign(3)>, 83L<EVP_PKEY_sign(3)|EVP_PKEY_sign(3)>,
84L<EVP_PKEY_verifyrecover(3)|EVP_PKEY_verifyrecover(3)>, 84L<EVP_PKEY_verify_recover(3)|EVP_PKEY_verify_recover(3)>,
85L<EVP_PKEY_derive(3)|EVP_PKEY_derive(3)> 85L<EVP_PKEY_derive(3)|EVP_PKEY_derive(3)>
86 86
87=head1 HISTORY 87=head1 HISTORY
diff --git a/src/lib/libcrypto/doc/EVP_PKEY_verify_recover.pod b/src/lib/libcrypto/doc/EVP_PKEY_verify_recover.pod
new file mode 100644
index 0000000000..23a28a9c43
--- /dev/null
+++ b/src/lib/libcrypto/doc/EVP_PKEY_verify_recover.pod
@@ -0,0 +1,103 @@
1=pod
2
3=head1 NAME
4
5EVP_PKEY_verify_recover_init, EVP_PKEY_verify_recover - recover signature using a public key algorithm
6
7=head1 SYNOPSIS
8
9 #include <openssl/evp.h>
10
11 int EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx);
12 int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx,
13 unsigned char *rout, size_t *routlen,
14 const unsigned char *sig, size_t siglen);
15
16=head1 DESCRIPTION
17
18The EVP_PKEY_verify_recover_init() function initializes a public key algorithm
19context using key B<pkey> for a verify recover operation.
20
21The EVP_PKEY_verify_recover() function recovers signed data
22using B<ctx>. The signature is specified using the B<sig> and
23B<siglen> parameters. If B<rout> is B<NULL> then the maximum size of the output
24buffer is written to the B<routlen> parameter. If B<rout> is not B<NULL> then
25before the call the B<routlen> parameter should contain the length of the
26B<rout> buffer, if the call is successful recovered data is written to
27B<rout> and the amount of data written to B<routlen>.
28
29=head1 NOTES
30
31Normally an application is only interested in whether a signature verification
32operation is successful in those cases the EVP_verify() function should be
33used.
34
35Sometimes however it is useful to obtain the data originally signed using a
36signing operation. Only certain public key algorithms can recover a signature
37in this way (for example RSA in PKCS padding mode).
38
39After the call to EVP_PKEY_verify_recover_init() algorithm specific control
40operations can be performed to set any appropriate parameters for the
41operation.
42
43The function EVP_PKEY_verify_recover() can be called more than once on the same
44context if several operations are performed using the same parameters.
45
46=head1 RETURN VALUES
47
48EVP_PKEY_verify_recover_init() and EVP_PKEY_verify_recover() return 1 for success
49and 0 or a negative value for failure. In particular a return value of -2
50indicates the operation is not supported by the public key algorithm.
51
52=head1 EXAMPLE
53
54Recover digest originally signed using PKCS#1 and SHA256 digest:
55
56 #include <openssl/evp.h>
57 #include <openssl/rsa.h>
58
59 EVP_PKEY_CTX *ctx;
60 unsigned char *rout, *sig;
61 size_t routlen, siglen;
62 EVP_PKEY *verify_key;
63 /* NB: assumes verify_key, sig and siglen are already set up
64 * and that verify_key is an RSA public key
65 */
66 ctx = EVP_PKEY_CTX_new(verify_key);
67 if (!ctx)
68 /* Error occurred */
69 if (EVP_PKEY_verify_recover_init(ctx) <= 0)
70 /* Error */
71 if (EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_PKCS1_PADDING) <= 0)
72 /* Error */
73 if (EVP_PKEY_CTX_set_signature_md(ctx, EVP_sha256()) <= 0)
74 /* Error */
75
76 /* Determine buffer length */
77 if (EVP_PKEY_verify_recover(ctx, NULL, &routlen, sig, siglen) <= 0)
78 /* Error */
79
80 rout = OPENSSL_malloc(routlen);
81
82 if (!rout)
83 /* malloc failure */
84
85 if (EVP_PKEY_verify_recover(ctx, rout, &routlen, sig, siglen) <= 0)
86 /* Error */
87
88 /* Recovered data is routlen bytes written to buffer rout */
89
90=head1 SEE ALSO
91
92L<EVP_PKEY_CTX_new(3)|EVP_PKEY_CTX_new(3)>,
93L<EVP_PKEY_encrypt(3)|EVP_PKEY_encrypt(3)>,
94L<EVP_PKEY_decrypt(3)|EVP_PKEY_decrypt(3)>,
95L<EVP_PKEY_sign(3)|EVP_PKEY_sign(3)>,
96L<EVP_PKEY_verify(3)|EVP_PKEY_verify(3)>,
97L<EVP_PKEY_derive(3)|EVP_PKEY_derive(3)>
98
99=head1 HISTORY
100
101These functions were first added to OpenSSL 1.0.0.
102
103=cut
diff --git a/src/lib/libcrypto/doc/X509_STORE_CTX_get_error.pod b/src/lib/libcrypto/doc/X509_STORE_CTX_get_error.pod
index a883f6c097..60e8332ae9 100644
--- a/src/lib/libcrypto/doc/X509_STORE_CTX_get_error.pod
+++ b/src/lib/libcrypto/doc/X509_STORE_CTX_get_error.pod
@@ -278,6 +278,8 @@ happen if extended CRL checking is enabled.
278an application specific error. This will never be returned unless explicitly 278an application specific error. This will never be returned unless explicitly
279set by an application. 279set by an application.
280 280
281=back
282
281=head1 NOTES 283=head1 NOTES
282 284
283The above functions should be used instead of directly referencing the fields 285The above functions should be used instead of directly referencing the fields
diff --git a/src/lib/libcrypto/doc/X509_VERIFY_PARAM_set_flags.pod b/src/lib/libcrypto/doc/X509_VERIFY_PARAM_set_flags.pod
index b68eece033..46cac2bea2 100644
--- a/src/lib/libcrypto/doc/X509_VERIFY_PARAM_set_flags.pod
+++ b/src/lib/libcrypto/doc/X509_VERIFY_PARAM_set_flags.pod
@@ -113,7 +113,7 @@ a special status code is set to the verification callback. This permits it
113to examine the valid policy tree and perform additional checks or simply 113to examine the valid policy tree and perform additional checks or simply
114log it for debugging purposes. 114log it for debugging purposes.
115 115
116By default some addtional features such as indirect CRLs and CRLs signed by 116By default some additional features such as indirect CRLs and CRLs signed by
117different keys are disabled. If B<X509_V_FLAG_EXTENDED_CRL_SUPPORT> is set 117different keys are disabled. If B<X509_V_FLAG_EXTENDED_CRL_SUPPORT> is set
118they are enabled. 118they are enabled.
119 119