<?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 => 'en',
  ),
  'this' => 
  array (
    0 => 'openssl.cms.flags.php',
    1 => 'CMS Flags/Constants',
    2 => 'CMS Flags/Constants',
  ),
  'up' => 
  array (
    0 => 'openssl.constants.php',
    1 => 'Predefined Constants',
  ),
  'prev' => 
  array (
    0 => 'openssl.pkcs7.flags.php',
    1 => 'PKCS7 Flags/Constants',
  ),
  'next' => 
  array (
    0 => 'openssl.signature-algos.php',
    1 => 'Signature Algorithms',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    '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> Flags/Constants</h2>
   <p class="para">
    The CMS functions make use of flags which are specified using a
    bitfield which can include one or more of the following values:
    <table class="doctable table">
     <caption><strong><abbr>CMS</abbr> CONSTANTS</strong></caption>
      
       <thead>
        <tr>
         <th>Constant</th>
         <th>Description</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>
          Adds text/plain content type headers to encrypted/signed
          message. If decrypting or verifying, it strips those headers from
          the output - if the decrypted or verified message is not of MIME type
          text/plain then an error will occur.
         </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>
          Normally the input message is converted to &quot;canonical&quot; format
          which is effectively using <code class="literal">CR</code> and <code class="literal">LF</code>
          as end of line: as required by the CMS specification.  When this
          option is present, no translation occurs. This is useful when
          handling binary data which may not be in CMS format.
         </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>
          When verifying a message, certificates (if
          any) included in the message are normally searched for the
          signing certificate. With this option only the
          certificates specified in the <code class="parameter">untrusted_certificates_filename</code>
          parameter of <span class="function"><a href="function.openssl-cms-verify.php" class="function">openssl_cms_verify()</a></span> are
          used.  The supplied certificates can still be used as
          untrusted CAs however.
         </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>
          Do not verify the signers certificate of a signed
          message.
         </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>Don&#039;t try and verify the signatures on a message</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>
          Available as of PHP 8.3.0.
          Sets the content-type to <code class="literal">application/x-pkcs7-mime</code> instead of
          <code class="literal">application/pkcs7-mime</code> to encrypt a message.
         </td>
        </tr>

       </tbody>
      
     </table>

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