diff options
author | markus <> | 2003-05-11 21:36:58 +0000 |
---|---|---|
committer | markus <> | 2003-05-11 21:36:58 +0000 |
commit | 1c98a87f0daac81245653c227eb2f2508a22a965 (patch) | |
tree | 3de6d603296ec563b936da4e6a8a1e33d48f8884 /src/lib/libcrypto/doc/PKCS7_decrypt.pod | |
parent | 31392c89d1135cf2a416f97295f6d21681b3fbc4 (diff) | |
download | openbsd-1c98a87f0daac81245653c227eb2f2508a22a965.tar.gz openbsd-1c98a87f0daac81245653c227eb2f2508a22a965.tar.bz2 openbsd-1c98a87f0daac81245653c227eb2f2508a22a965.zip |
import 0.9.7b (without idea and rc5)
Diffstat (limited to 'src/lib/libcrypto/doc/PKCS7_decrypt.pod')
-rw-r--r-- | src/lib/libcrypto/doc/PKCS7_decrypt.pod | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/lib/libcrypto/doc/PKCS7_decrypt.pod b/src/lib/libcrypto/doc/PKCS7_decrypt.pod new file mode 100644 index 0000000000..b0ca067b89 --- /dev/null +++ b/src/lib/libcrypto/doc/PKCS7_decrypt.pod | |||
@@ -0,0 +1,53 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | PKCS7_decrypt - decrypt content from a PKCS#7 envelopedData structure | ||
6 | |||
7 | =head1 SYNOPSIS | ||
8 | |||
9 | int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags); | ||
10 | |||
11 | =head1 DESCRIPTION | ||
12 | |||
13 | PKCS7_decrypt() extracts and decrypts the content from a PKCS#7 envelopedData | ||
14 | structure. B<pkey> is the private key of the recipient, B<cert> is the | ||
15 | recipients certificate, B<data> is a BIO to write the content to and | ||
16 | B<flags> is an optional set of flags. | ||
17 | |||
18 | =head1 NOTES | ||
19 | |||
20 | OpenSSL_add_all_algorithms() (or equivalent) should be called before using this | ||
21 | function or errors about unknown algorithms will occur. | ||
22 | |||
23 | Although the recipients certificate is not needed to decrypt the data it is needed | ||
24 | to locate the appropriate (of possible several) recipients in the PKCS#7 structure. | ||
25 | |||
26 | The following flags can be passed in the B<flags> parameter. | ||
27 | |||
28 | If the B<PKCS7_TEXT> flag is set MIME headers for type B<text/plain> are deleted | ||
29 | from the content. If the content is not of type B<text/plain> then an error is | ||
30 | returned. | ||
31 | |||
32 | =head1 RETURN VALUES | ||
33 | |||
34 | PKCS7_decrypt() returns either 1 for success or 0 for failure. | ||
35 | The error can be obtained from ERR_get_error(3) | ||
36 | |||
37 | =head1 BUGS | ||
38 | |||
39 | PKCS7_decrypt() must be passed the correct recipient key and certificate. It would | ||
40 | be better if it could look up the correct key and certificate from a database. | ||
41 | |||
42 | The lack of single pass processing and need to hold all data in memory as | ||
43 | mentioned in PKCS7_sign() also applies to PKCS7_verify(). | ||
44 | |||
45 | =head1 SEE ALSO | ||
46 | |||
47 | L<ERR_get_error(3)|ERR_get_error(3)>, L<PKCS7_encrypt(3)|PKCS7_encrypt(3)> | ||
48 | |||
49 | =head1 HISTORY | ||
50 | |||
51 | PKCS7_decrypt() was added to OpenSSL 0.9.5 | ||
52 | |||
53 | =cut | ||