<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/openssl.constants.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'openssl.cms.flags.php',
    1 => 'CMS Flag/常量',
    2 => 'CMS Flag/常量',
  ),
  'up' => 
  array (
    0 => 'openssl.constants.php',
    1 => '预定义常量',
  ),
  'prev' => 
  array (
    0 => 'openssl.pkcs7.flags.php',
    1 => 'PKCS7 flag/常量',
  ),
  'next' => 
  array (
    0 => 'openssl.signature-algos.php',
    1 => '签名算法',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'zh',
    'path' => 'reference/openssl/constants.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="openssl.cms.flags" class="section">
   <h2 class="title"><abbr>CMS</abbr> Flag/常量</h2>
   <p class="para">
    CMS 函数使用 flag，这些 flag 使用位字段指定，位字段可以包含以下一个或多个值：
    <table class="doctable table">
     <caption><strong><abbr>CMS</abbr> CONSTANTS</strong></caption>
      
       <thead>
        <tr>
         <th>常量名</th>
         <th>说明</th>
        </tr>

       </thead>

       <tbody class="tbody">
        <tr id="constant.openssl-cms-text">
         <td>
          <strong><code><a href="openssl.cms.flags.php#constant.openssl-cms-text">OPENSSL_CMS_TEXT</a></code></strong>
          (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
         </td>
         <td>
          将 text/plain 内容类型标头添加到加密/签名消息中。如果解密或验证，将从输出中去除这些标头；如果解密或验证的消息不是 MIME 类型 text/plain，则会发生错误。
         </td>
        </tr>

        <tr id="constant.openssl-cms-binary">
         <td>
          <strong><code><a href="openssl.cms.flags.php#constant.openssl-cms-binary">OPENSSL_CMS_BINARY</a></code></strong>
          (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
         </td>
         <td>
          通常，输入消息被转换为有效使用 <code class="literal">CR</code> 和 <code class="literal">LF</code> 作为行尾的“canonical”格式：按照
          CMS 规范的要求。存在此选项时，不会发生翻译。这在处理可能不是 CMS 格式的二进制数据时很有用。
         </td>
        </tr>

        <tr id="constant.openssl-cms-nointern">
         <td>
          <strong><code><a href="openssl.cms.flags.php#constant.openssl-cms-nointern">OPENSSL_CMS_NOINTERN</a></code></strong>
          (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
         </td>
         <td>
          验证消息时，通常会搜索消息中包含的证书（如果有）以查找签名证书。使用此选项仅使用在 <span class="function"><a href="function.openssl-cms-verify.php" class="function">openssl_cms_verify()</a></span>
          的 <code class="parameter">untrusted_certificates_filename</code> 参数中指定的证书。但是，提供的证书仍可用作不受信任的 CA。
         </td>
        </tr>

        <tr id="constant.openssl-cms-noverify">
         <td>
          <strong><code><a href="openssl.cms.flags.php#constant.openssl-cms-noverify">OPENSSL_CMS_NOVERIFY</a></code></strong>
          (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
         </td>
         <td>
          不验证签名消息的签名者证书。
         </td>
        </tr>

        <tr id="constant.openssl-cms-nocerts">
         <td>
          <strong><code><a href="openssl.cms.flags.php#constant.openssl-cms-nocerts">OPENSSL_CMS_NOCERTS</a></code></strong>
          (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
         </td>
         <td>
          When signing a message the signer&#039;s certificate is normally
          included - with this option it is excluded.  This will reduce the
          size of the signed message but the verifier must have a copy of the
          signers certificate available locally (passed using the
          <code class="parameter">untrusted_certificates_filename</code> to
          <span class="function"><a href="function.openssl-cms-verify.php" class="function">openssl_cms_verify()</a></span> for example).
         </td>
        </tr>

        <tr id="constant.openssl-cms-noattr">
         <td>
          <strong><code><a href="openssl.cms.flags.php#constant.openssl-cms-noattr">OPENSSL_CMS_NOATTR</a></code></strong>
          (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
         </td>
         <td>
          Normally when a message is signed, a set of attributes are
          included which include the signing time and the supported symmetric
          algorithms.  With this option they are not included.
         </td>
        </tr>

        <tr id="constant.openssl-cms-detached">
         <td>
          <strong><code><a href="openssl.cms.flags.php#constant.openssl-cms-detached">OPENSSL_CMS_DETACHED</a></code></strong>
          (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
         </td>
         <td>
          When signing a message, use cleartext signing with the MIME
          type <code class="literal">&quot;multipart/signed&quot;</code>. This is the default
          if you do not specify any <code class="parameter">flags</code> to
          <span class="function"><a href="function.openssl-cms-sign.php" class="function">openssl_cms_sign()</a></span>.
          If you turn this option off, the message will be signed using
          opaque signing, which is more resistant to translation by mail relays
          but cannot be read by mail agents that do not support S/MIME.
         </td>
        </tr>

        <tr id="constant.openssl-cms-nosigs">
         <td>
          <strong><code><a href="openssl.cms.flags.php#constant.openssl-cms-nosigs">OPENSSL_CMS_NOSIGS</a></code></strong>
          (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
         </td>
         <td>不要尝试验证消息的签名</td>
        </tr>

        <tr id="constant.openssl-cms-oldmimetype">
         <td>
          <strong><code><a href="openssl.cms.flags.php#constant.openssl-cms-oldmimetype">OPENSSL_CMS_OLDMIMETYPE</a></code></strong>
          (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
         </td>
         <td>
          自 PHP 8.3.0 起可用。
          将 content-type 设置为 <code class="literal">application/x-pkcs7-mime</code>，而不是 <code class="literal">application/pkcs7-mime</code> 来加密消息。
         </td>
        </tr>

       </tbody>
      
     </table>

   </p>
  </div><?php manual_footer($setup); ?>