diff options
| author | schwarze <> | 2019-08-18 13:02:37 +0000 |
|---|---|---|
| committer | schwarze <> | 2019-08-18 13:02:37 +0000 |
| commit | 93799276cd1bbad15495a2073272e538f2affd8e (patch) | |
| tree | 0658a4d38515e513e616fbeacc27ff4764a33c43 /src/lib/libcrypto/man/SMIME_read_CMS.3 | |
| parent | b10b0cfcd860f250f32febb85fd57cfc747f0146 (diff) | |
| download | openbsd-93799276cd1bbad15495a2073272e538f2affd8e.tar.gz openbsd-93799276cd1bbad15495a2073272e538f2affd8e.tar.bz2 openbsd-93799276cd1bbad15495a2073272e538f2affd8e.zip | |
minor cleanup:
* avoid jumping back and forth between use cases
* delete duplicate information
* and minor wording improvements
Diffstat (limited to 'src/lib/libcrypto/man/SMIME_read_CMS.3')
| -rw-r--r-- | src/lib/libcrypto/man/SMIME_read_CMS.3 | 50 |
1 files changed, 15 insertions, 35 deletions
diff --git a/src/lib/libcrypto/man/SMIME_read_CMS.3 b/src/lib/libcrypto/man/SMIME_read_CMS.3 index 94bce42390..af2facf129 100644 --- a/src/lib/libcrypto/man/SMIME_read_CMS.3 +++ b/src/lib/libcrypto/man/SMIME_read_CMS.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: SMIME_read_CMS.3,v 1.3 2019/08/12 16:00:05 schwarze Exp $ | 1 | .\" $OpenBSD: SMIME_read_CMS.3,v 1.4 2019/08/18 13:02:37 schwarze Exp $ |
| 2 | .\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | 2 | .\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 |
| 3 | .\" | 3 | .\" |
| 4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | 4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. |
| @@ -48,7 +48,7 @@ | |||
| 48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
| 49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
| 50 | .\" | 50 | .\" |
| 51 | .Dd $Mdocdate: August 12 2019 $ | 51 | .Dd $Mdocdate: August 18 2019 $ |
| 52 | .Dt SMIME_READ_CMS 3 | 52 | .Dt SMIME_READ_CMS 3 |
| 53 | .Os | 53 | .Os |
| 54 | .Sh NAME | 54 | .Sh NAME |
| @@ -63,40 +63,22 @@ | |||
| 63 | .Fc | 63 | .Fc |
| 64 | .Sh DESCRIPTION | 64 | .Sh DESCRIPTION |
| 65 | .Fn SMIME_read_CMS | 65 | .Fn SMIME_read_CMS |
| 66 | parses a message in S/MIME format. | 66 | parses a message in S/MIME format from |
| 67 | .Fa in . | ||
| 67 | .Pp | 68 | .Pp |
| 68 | .Fa in | 69 | If the message uses cleartext signing, the content is saved in a memory BIO |
| 69 | is a | ||
| 70 | .Vt BIO | ||
| 71 | to read the message from. | ||
| 72 | .Pp | ||
| 73 | If cleartext signing is used, then the content is saved in a memory BIO | ||
| 74 | which is written to | 70 | which is written to |
| 75 | .Pf * Fa bcont ; | ||
| 76 | otherwise | ||
| 77 | .Pf * Fa bcont | ||
| 78 | is set to | ||
| 79 | .Dv NULL . | ||
| 80 | .Pp | ||
| 81 | The parsed | ||
| 82 | .Vt CMS_ContentInfo | ||
| 83 | structure is returned, or | ||
| 84 | .Dv NULL | ||
| 85 | if an error occurred. | ||
| 86 | .Pp | ||
| 87 | If | ||
| 88 | .Pf * Fa bcont | 71 | .Pf * Fa bcont |
| 89 | is not | 72 | and which can then be passed to |
| 90 | .Dv NULL , | ||
| 91 | then the message is clear text signed. | ||
| 92 | .Pf * Fa bcont | ||
| 93 | can then be passed to | ||
| 94 | .Xr CMS_verify 3 | 73 | .Xr CMS_verify 3 |
| 95 | with the | 74 | with the |
| 96 | .Dv CMS_DETACHED | 75 | .Dv CMS_DETACHED |
| 97 | flag set. | 76 | flag set. |
| 98 | .Pp | 77 | Otherwise, |
| 99 | Otherwise the type of the returned structure can be determined using | 78 | .Pf * Fa bcont |
| 79 | is set to | ||
| 80 | .Dv NULL | ||
| 81 | and the type of the returned structure can be determined using | ||
| 100 | .Xr CMS_get0_type 3 . | 82 | .Xr CMS_get0_type 3 . |
| 101 | .Pp | 83 | .Pp |
| 102 | To support future functionality if | 84 | To support future functionality if |
| @@ -105,13 +87,11 @@ is not | |||
| 105 | .Dv NULL , | 87 | .Dv NULL , |
| 106 | .Pf * Fa bcont | 88 | .Pf * Fa bcont |
| 107 | should be initialized to | 89 | should be initialized to |
| 108 | .Dv NULL . | 90 | .Dv NULL , |
| 109 | For example: | 91 | for example: |
| 110 | .Bd -literal -offset indent | 92 | .Bd -literal -offset indent |
| 111 | BIO *cont = NULL; | 93 | BIO *cont = NULL; |
| 112 | CMS_ContentInfo *cms; | 94 | CMS_ContentInfo *cms = SMIME_read_CMS(in, &cont); |
| 113 | |||
| 114 | cms = SMIME_read_CMS(in, &cont); | ||
| 115 | .Ed | 95 | .Ed |
| 116 | .Sh RETURN VALUES | 96 | .Sh RETURN VALUES |
| 117 | .Fn SMIME_read_CMS | 97 | .Fn SMIME_read_CMS |
| @@ -147,5 +127,5 @@ structure is always base64 encoded and will not handle the case | |||
| 147 | where it is in binary format or uses quoted printable format. | 127 | where it is in binary format or uses quoted printable format. |
| 148 | .Pp | 128 | .Pp |
| 149 | The use of a memory BIO to hold the signed content limits the size of | 129 | The use of a memory BIO to hold the signed content limits the size of |
| 150 | message which can be processed due to memory restraints: a streaming | 130 | the message which can be processed due to memory restraints: a streaming |
| 151 | single pass option should be available. | 131 | single pass option should be available. |
