<div class="content" name="PublishCRLs" uuid="da367279-8fb0-4111-8b8b-19dcf75ae336"><p>The PublishCRLs method instructs a <span><a href="c6451297-197d-4b4b-b786-3f3187b67b8f#gt_c925d5d7-a442-4ba4-9586-5f94ccec847a" data-linktype="relative-path">CA</a></span> to publish <span><a href="c6451297-197d-4b4b-b786-3f3187b67b8f#gt_4f22841f-249b-42fb-a31a-5049c00be939" data-linktype="relative-path">CRLs</a></span>
and delta CRLs. This call can either cause the republishing of the current CRLs
or cause the CA to create and publish new CRLs.</p><dl>
<dd>
<div><pre> HRESULT PublishCRLs(
   [in, string, unique] wchar_t const* pwszAuthority,
   [in] FILETIME FileTime,
   [in] DWORD Flags
 );
</pre></div>
</dd></dl><p><b>pwszAuthority: </b>See the definition of the <i>pwszAuthority</i>
parameter in section <span><a href="faae1099-4b4f-463c-95b0-5962c9bf400e" data-linktype="relative-path">3.1.4.1.1</a></span>.</p><p><b>FileTime: </b>Contains a 64-bit value that
represents the number of 100-nanosecond intervals since January 1, 1601 (<span><a href="c6451297-197d-4b4b-b786-3f3187b67b8f#gt_f2369991-a884-4843-a8fa-1505b6d5ece7" data-linktype="relative-path">UTC</a></span>).
Specifies the nextUpdate value of the CRL, as specified in <span><a href="https://go.microsoft.com/fwlink/?LinkId=90414" data-linktype="external">[RFC3280]</a></span>
section 5.1.2.5, in Greenwich Mean Time.</p><p><b>Flags: </b>An unsigned integer value that
specifies the type of CRL to publish and the publishing parameters. This
parameter MUST be set to a combination of the following values. <i>Flags</i>
uses B as the least-significant bit. It uses B, D and F as shown in the
following table.</p><dl>
<dd>
<table>
 <tbody><tr>
  <th><p><br/>0</p></th>
  <th><p><br/>1</p></th>
  <th><p><br/>2</p></th>
  <th><p><br/>3</p></th>
  <th><p><br/>4</p></th>
  <th><p><br/>5</p></th>
  <th><p><br/>6</p></th>
  <th><p><br/>7</p></th>
  <th><p><br/>8</p></th>
  <th><p><br/>9</p></th>
  <th><p>1<br/>0</p></th>
  <th><p><br/>1</p></th>
  <th><p><br/>2</p></th>
  <th><p><br/>3</p></th>
  <th><p><br/>4</p></th>
  <th><p><br/>5</p></th>
  <th><p><br/>6</p></th>
  <th><p><br/>7</p></th>
  <th><p><br/>8</p></th>
  <th><p><br/>9</p></th>
  <th><p>2<br/>0</p></th>
  <th><p><br/>1</p></th>
  <th><p><br/>2</p></th>
  <th><p><br/>3</p></th>
  <th><p><br/>4</p></th>
  <th><p><br/>5</p></th>
  <th><p><br/>6</p></th>
  <th><p><br/>7</p></th>
  <th><p><br/>8</p></th>
  <th><p><br/>9</p></th>
  <th><p>3<br/>0</p></th>
  <th><p><br/>1</p></th>
 </tr>
 <tr>
  <td>B</td>
  <td>D</td>
  <td>0</td>
  <td>0</td>
  <td>F</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
 </tr>
</tbody></table>
</dd></dl><p> </p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>B</td>
  <td>If 1, the CA MUST publish a base CRL.</td>
 </tr><tr>
  <td>D</td>
  <td>If 1, the CA MUST publish a delta CRL.</td>
 </tr><tr>
  <td>F</td>
  <td>If 1, the CA MUST republish the existing CRLs.</td>
 </tr></tbody></table>
</dd></dl><p>The CA server MUST apply the following processing rules:</p><ol><li><p><span>    </span>If the F bit is
set in <i>Flags</i>, the <i>FileTime</i> parameter is ignored and the following
MUST occur:</p>
<ul><li><p><span><span>  </span></span>If
the B bit is set in <i>Flags</i>, the CA MUST republish the most recent base
CRL (the CRL identified by the CRL <span><a href="c6451297-197d-4b4b-b786-3f3187b67b8f#gt_d3a7da8d-a597-4838-9756-25e30b640ba7" data-linktype="relative-path">table</a></span> row with
CRL_Min_Base of 0 and the highest CRL_Number) for each valid CA <span><a href="c6451297-197d-4b4b-b786-3f3187b67b8f#gt_718bfd46-3cd2-45e8-befa-55f5c9f3be7b" data-linktype="relative-path">key</a></span>
(CRL_Name_ID) and for each partition to the locations that are identified in
Config_CA_CDP_Publish_To_Base using the logic in section <span><a href="f79c3fb5-30d4-49a1-a21f-e8101a6ced49" data-linktype="relative-path">3.1.5.2</a></span>,
rules 2 and 3 only.<a id="Appendix_A_Target_79"></a><a aria-label="Product behavior note 79" href="5f06c74c-1a29-4fdf-b8dd-ae3300d1b90d#Appendix_A_79" data-linktype="relative-path">&lt;79&gt;</a></p>
</li><li><p><span><span>  </span></span>If
the D bit is set in <i>Flags</i>, the CA MUST publish the most recent delta CRL
(the CRL identified by the CRL table row with CRL_Min_Base not equal to 0 and
the highest CRL_Number) for each valid CA key (CRL_Name_ID) and for each
partition to the locations that are identified in
Config_CA_CDP_Publish_To_Delta using the logic in section 3.1.5.2, rules 2 and
3 only.<a id="Appendix_A_Target_80"></a><a aria-label="Product behavior note 80" href="5f06c74c-1a29-4fdf-b8dd-ae3300d1b90d#Appendix_A_80" data-linktype="relative-path">&lt;80&gt;</a></p>
</li><li><p><span><span>  </span></span>If
neither the B bit nor the D bit is set in <i>Flags</i>, the CA MUST return an
error. The error SHOULD be ERROR_INVALID_PARAMETER.</p>
</li></ul></li><li><p><span>    </span>If the F bit is
NOT set in <i>Flags</i>, the following SHOULD occur:</p>
<p>The CA MUST create a CRL for each valid CA key and
for each partition using the logic in section <span><span><a href="69c1c13a-e270-49ad-9bc1-a94fe019c8c9" data-linktype="relative-path"><span>3.1.4.1.6</span></a></span></span>, rules 2
through 7. The CRL type is determined as follows:</p>
<ul><li><p><span><span> 
</span></span>If the B bit is set in <i>Flags</i>, the type of CRL that the CA
creates for each valid CA key and each partition MUST be a new base CRL and, if
delta CRLs are enabled, a delta CRL.</p>
</li><li><p><span><span> 
</span></span>If the D bit is set in <i>Flags</i>, the type of CRL that the CA
creates for each valid CA key and each partition MUST be a new delta CRL.</p>
</li><li><p><span><span> 
</span></span>If neither the B bit nor the D bit is set in <i>Flags</i>, the CA
MUST return an error. The error SHOULD be ERROR_INVALID_PARAMETER.</p>
</li></ul></li><li><p><span>    </span>The CA MUST then
publish the CRLs using the logic in section 3.1.4.1.6, rules 8 through 13.</p>
</li></ol><p>Return value: The method returns the first error code
returned from the first CRL write operation that failed or was aborted. If none
of the CRL write operations failed, the method returns 0.</p></div>