1SMIME_read_PKCS7(3)                 OpenSSL                SMIME_read_PKCS7(3)
2
3
4

NAME

6       SMIME_read_PKCS7 - parse S/MIME message.
7

SYNOPSIS

9       PKCS7 *SMIME_read_PKCS7(BIO *in, BIO **bcont);
10

DESCRIPTION

12       SMIME_read_PKCS7() parses a message in S/MIME format.
13
14       in is a BIO to read the message from.
15
16       If cleartext signing is used then the content is saved in a memory bio
17       which is written to *bcont, otherwise *bcont is set to NULL.
18
19       The parsed PKCS#7 structure is returned or NULL if an error occurred.
20

NOTES

22       If *bcont is not NULL then the message is clear text signed. *bcont can
23       then be passed to PKCS7_verify() with the PKCS7_DETACHED flag set.
24
25       Otherwise the type of the returned structure can be determined using
26       PKCS7_type().
27
28       To support future functionality if bcont is not NULL *bcont should be
29       initialized to NULL. For example:
30
31        BIO *cont = NULL;
32        PKCS7 *p7;
33
34        p7 = SMIME_read_PKCS7(in, &cont);
35

BUGS

37       The MIME parser used by SMIME_read_PKCS7() is somewhat primitive.
38       While it will handle most S/MIME messages more complex compound formats
39       may not work.
40
41       The parser assumes that the PKCS7 structure is always base64 encoded
42       and will not handle the case where it is in binary format or uses
43       quoted printable format.
44
45       The use of a memory BIO to hold the signed content limits the size of
46       message which can be processed due to memory restraints: a streaming
47       single pass option should be available.
48

RETURN VALUES

50       SMIME_read_PKCS7() returns a valid PKCS7 structure or NULL is an error
51       occurred. The error can be obtained from ERR_get_error(3).
52

SEE ALSO

54       ERR_get_error(3), PKCS7_type(3) SMIME_read_PKCS7(3), PKCS7_sign(3),
55       PKCS7_verify(3), PKCS7_encrypt(3) PKCS7_decrypt(3)
56

HISTORY

58       SMIME_read_PKCS7() was added to OpenSSL 0.9.5
59
60
61
620.9.8b                            2002-10-09               SMIME_read_PKCS7(3)
Impressum