diff options
author | schwarze <> | 2016-11-05 14:35:59 +0000 |
---|---|---|
committer | schwarze <> | 2016-11-05 14:35:59 +0000 |
commit | 481499412cc7532864ff2e0b2a8c8b24be28fb8d (patch) | |
tree | 1041c83d337ebec403fd9cfd21175b43b3642c11 | |
parent | ac13059ace7b9575014c51d74e96157cc83bfca9 (diff) | |
download | openbsd-481499412cc7532864ff2e0b2a8c8b24be28fb8d.tar.gz openbsd-481499412cc7532864ff2e0b2a8c8b24be28fb8d.tar.bz2 openbsd-481499412cc7532864ff2e0b2a8c8b24be28fb8d.zip |
add the missing content, sorry for committing an empty file
-rw-r--r-- | src/lib/libcrypto/man/PKCS7_decrypt.3 | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/PKCS7_decrypt.3 b/src/lib/libcrypto/man/PKCS7_decrypt.3 index e69de29bb2..efc8454dde 100644 --- a/src/lib/libcrypto/man/PKCS7_decrypt.3 +++ b/src/lib/libcrypto/man/PKCS7_decrypt.3 | |||
@@ -0,0 +1,69 @@ | |||
1 | .Dd $Mdocdate: November 5 2016 $ | ||
2 | .Dt PKCS7_DECRYPT 3 | ||
3 | .Os | ||
4 | .Sh NAME | ||
5 | .Nm PKCS7_decrypt | ||
6 | .Nd decrypt content from a PKCS#7 envelopedData structure | ||
7 | .Sh SYNOPSIS | ||
8 | .In openssl/pkcs7.h | ||
9 | .Ft int | ||
10 | .Fo PKCS7_decrypt | ||
11 | .Fa "PKCS7 *p7" | ||
12 | .Fa "EVP_PKEY *pkey" | ||
13 | .Fa "X509 *cert" | ||
14 | .Fa "BIO *data" | ||
15 | .Fa "int flags" | ||
16 | .Fc | ||
17 | .Sh DESCRIPTION | ||
18 | .Fn PKCS7_decrypt | ||
19 | extracts and decrypts the content from a PKCS#7 envelopedData structure. | ||
20 | .Fa pkey | ||
21 | is the private key of the recipient, | ||
22 | .Fa cert | ||
23 | is the recipient's certificate, | ||
24 | .Fa data | ||
25 | is a | ||
26 | .Vt BIO | ||
27 | to write the content to and | ||
28 | .Fa flags | ||
29 | is an optional set of flags. | ||
30 | .Pp | ||
31 | .Xr OpenSSL_add_all_algorithms 3 | ||
32 | (or equivalent) should be called before using this function or errors | ||
33 | about unknown algorithms will occur. | ||
34 | .Pp | ||
35 | Although the recipient's certificate is not needed to decrypt the data, | ||
36 | it is needed to locate the appropriate (of possible several) recipients | ||
37 | in the PKCS#7 structure. | ||
38 | .Pp | ||
39 | If the | ||
40 | .Dv PKCS7_TEXT | ||
41 | .Fa flag | ||
42 | is set, MIME headers for type | ||
43 | .Sy text/plain | ||
44 | are deleted from the content. | ||
45 | If the content is not of type | ||
46 | .Sy text/plain , | ||
47 | an error is returned. | ||
48 | .Sh RETURN VALUES | ||
49 | .Fn PKCS7_decrypt | ||
50 | returns 1 for success or 0 for failure. | ||
51 | The error can be obtained from | ||
52 | .Xr ERR_get_error 3 | ||
53 | .Sh SEE ALSO | ||
54 | .Xr ERR_get_error 3 , | ||
55 | .Xr PKCS7_encrypt 3 | ||
56 | .Sh HISTORY | ||
57 | .Fn PKCS7_decrypt | ||
58 | was added to OpenSSL 0.9.5. | ||
59 | .Sh BUGS | ||
60 | .Fn PKCS7_decrypt | ||
61 | must be passed the correct recipient key and certificate. | ||
62 | It would be better if it could look up the correct key and certificate | ||
63 | from a database. | ||
64 | .Pp | ||
65 | The lack of single pass processing and need to hold all data in memory | ||
66 | as mentioned in | ||
67 | .Xr PKCS7_sign 3 | ||
68 | also applies to | ||
69 | .Xr PKCS7_decrypt 3 . | ||