106 lines
3.7 KiB
HTML
Executable File
106 lines
3.7 KiB
HTML
Executable File
<?xml version="1.0" ?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>SMIME_write_PKCS7</title>
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
<link rev="made" href="mailto:root@localhost" />
|
|
</head>
|
|
|
|
<body style="background-color: white">
|
|
|
|
|
|
<!-- INDEX BEGIN -->
|
|
<div name="index">
|
|
<p><a name="__index__"></a></p>
|
|
|
|
<ul>
|
|
|
|
<li><a href="#name">NAME</a></li>
|
|
<li><a href="#synopsis">SYNOPSIS</a></li>
|
|
<li><a href="#description">DESCRIPTION</a></li>
|
|
<li><a href="#notes">NOTES</a></li>
|
|
<li><a href="#bugs">BUGS</a></li>
|
|
<li><a href="#return_values">RETURN VALUES</a></li>
|
|
<li><a href="#see_also">SEE ALSO</a></li>
|
|
<li><a href="#copyright">COPYRIGHT</a></li>
|
|
</ul>
|
|
|
|
<hr name="index" />
|
|
</div>
|
|
<!-- INDEX END -->
|
|
|
|
<p>
|
|
</p>
|
|
<hr />
|
|
<h1><a name="name">NAME</a></h1>
|
|
<p>SMIME_write_PKCS7 - convert PKCS#7 structure to S/MIME format</p>
|
|
<p>
|
|
</p>
|
|
<hr />
|
|
<h1><a name="synopsis">SYNOPSIS</a></h1>
|
|
<pre>
|
|
#include <openssl/pkcs7.h></pre>
|
|
<pre>
|
|
int SMIME_write_PKCS7(BIO *out, PKCS7 *p7, BIO *data, int flags);</pre>
|
|
<p>
|
|
</p>
|
|
<hr />
|
|
<h1><a name="description">DESCRIPTION</a></h1>
|
|
<p>SMIME_write_PKCS7() adds the appropriate MIME headers to a PKCS#7
|
|
structure to produce an S/MIME message.</p>
|
|
<p><strong>out</strong> is the BIO to write the data to. <strong>p7</strong> is the appropriate <strong>PKCS7</strong>
|
|
structure. If streaming is enabled then the content must be supplied in the
|
|
<strong>data</strong> argument. <strong>flags</strong> is an optional set of flags.</p>
|
|
<p>
|
|
</p>
|
|
<hr />
|
|
<h1><a name="notes">NOTES</a></h1>
|
|
<p>The following flags can be passed in the <strong>flags</strong> parameter.</p>
|
|
<p>If <strong>PKCS7_DETACHED</strong> is set then cleartext signing will be used,
|
|
this option only makes sense for signedData where <strong>PKCS7_DETACHED</strong>
|
|
is also set when PKCS7_sign() is also called.</p>
|
|
<p>If the <strong>PKCS7_TEXT</strong> flag is set MIME headers for type <strong>text/plain</strong>
|
|
are added to the content, this only makes sense if <strong>PKCS7_DETACHED</strong>
|
|
is also set.</p>
|
|
<p>If the <strong>PKCS7_STREAM</strong> flag is set streaming is performed. This flag should
|
|
only be set if <strong>PKCS7_STREAM</strong> was also set in the previous call to
|
|
PKCS7_sign() or PKCS7_encrypt().</p>
|
|
<p>If cleartext signing is being used and <strong>PKCS7_STREAM</strong> not set then
|
|
the data must be read twice: once to compute the signature in PKCS7_sign()
|
|
and once to output the S/MIME message.</p>
|
|
<p>If streaming is performed the content is output in BER format using indefinite
|
|
length constructed encoding except in the case of signed data with detached
|
|
content where the content is absent and DER format is used.</p>
|
|
<p>
|
|
</p>
|
|
<hr />
|
|
<h1><a name="bugs">BUGS</a></h1>
|
|
<p>SMIME_write_PKCS7() always base64 encodes PKCS#7 structures, there
|
|
should be an option to disable this.</p>
|
|
<p>
|
|
</p>
|
|
<hr />
|
|
<h1><a name="return_values">RETURN VALUES</a></h1>
|
|
<p>SMIME_write_PKCS7() returns 1 for success or 0 for failure.</p>
|
|
<p>
|
|
</p>
|
|
<hr />
|
|
<h1><a name="see_also">SEE ALSO</a></h1>
|
|
<p><em>ERR_get_error(3)</em>, <em>PKCS7_sign(3)</em>,
|
|
<em>PKCS7_verify(3)</em>, <em>PKCS7_encrypt(3)</em>
|
|
<em>PKCS7_decrypt(3)</em></p>
|
|
<p>
|
|
</p>
|
|
<hr />
|
|
<h1><a name="copyright">COPYRIGHT</a></h1>
|
|
<p>Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved.</p>
|
|
<p>Licensed under the Apache License 2.0 (the "License"). You may not use
|
|
this file except in compliance with the License. You can obtain a copy
|
|
in the file LICENSE in the source distribution or at
|
|
<a href="https://www.openssl.org/source/license.html">https://www.openssl.org/source/license.html</a>.</p>
|
|
|
|
</body>
|
|
|
|
</html>
|