<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="checking-gpg-signature-windows">
      </a>
      2.1.4.3 Signature Checking Using Gpg4win for Windows
     </h4>
    </div>
   </div>
  </div>
  <p>
   The
   <a class="xref" href="checking-gpg-signature.html" title="2.1.4.2 Signature Checking Using GnuPG">
    Section 2.1.4.2, “Signature Checking Using GnuPG”
   </a>
   section describes
        how to verify MySQL downloads using GPG. That guide also applies
        to Microsoft Windows, but another option is to use a GUI tool
        like
   <a class="ulink" href="http://www.gpg4win.org/" target="_blank">
    Gpg4win
   </a>
   . You
        may use a different tool but our examples are based on Gpg4win,
        and utilize its bundled
   <code class="literal">
    Kleopatra
   </code>
   GUI.
  </p>
  <p>
   Download and install Gpg4win, load Kleopatra, and add the MySQL
        Release Engineering certificate. Do this by clicking
   <span class="guimenu">
    File
   </span>
   ,
   <span class="guimenu">
    Lookup on Server
   </span>
   .
        Type "Mysql Release Engineering" into the search box and press
   <span class="guibutton">
    Search
   </span>
   .
  </p>
  <div class="figure">
   <a name="gnupg-kleopatra-find-certificate">
   </a>
   <p class="title">
    <b>
     Figure 2.1 Kleopatra: Lookup on Server Wizard: Finding a Certificate
    </b>
   </p>
   <div class="figure-contents">
    <div class="mediaobject">
     <img alt='Shows a search input field titled "Find" with "MySQL Release Engineering" entered. The one result contains the following values: Name=MySQL Release Engineering, E-Mail=mysql-build@oss.oracle.com, Valid From=2021-12-14, Valid Until="Unknown", and Key-ID=467B 942D 3A79 BD29. Available action buttons are: Search, Select All, Deselect All, Details, Import, and Close.' src="images/gnupg-kleopatra-find-certificate.png" style="width: 100%; max-width: 780px;"/>
    </div>
   </div>
  </div>
  <br class="figure-break"/>
  <p>
   Select the "MySQL Release Engineering" certificate. The Key-ID
        must reference "3A79 BD29", or choose
   <span class="guibutton">
    Details...
   </span>
   to confirm the certificate is
        valid. Now, import it by clicking
   <span class="guibutton">
    Import
   </span>
   .
        When the import dialog is displayed, choose
   <span class="guibutton">
    Okay
   </span>
   , and this certificate should now be
        listed under the
   <span class="guilabel">
    Imported Certificates
   </span>
   tab.
  </p>
  <p>
   Next, grant trust to the certificate. Select our certificate,
        then from the main menu select
   <span class="guimenu">
    Certificates
   </span>
   ,
   <span class="guimenu">
    Change Certification Power
   </span>
   , and click
   <span class="guibutton">
    Grant Power
   </span>
   .
  </p>
  <div class="figure">
   <a name="gnupg-kleopatra-grant-certification-power">
   </a>
   <p class="title">
    <b>
     Figure 2.2 Kleopatra: Grant Certification Power for MySQL Release Engineering
    </b>
   </p>
   <div class="figure-contents">
    <div class="mediaobject">
     <img alt='A "Grant Certification Power" dialogue is displayed. Available action buttons are: Grant Power and Cancel.' src="images/gnupg-kleopatra-grant-certification-power.png" style="width: 100%; max-width: 1022px;"/>
    </div>
   </div>
  </div>
  <br class="figure-break"/>
  <p>
   Next, verify the downloaded MySQL package file. This requires
        files for both the packaged file, and the signature. The
        signature file must have the same name as the packaged file but
        with an appended
   <code class="filename">
    .asc
   </code>
   extension, as shown
        by the example in the following table. The signature is linked
        to on the downloads page for each MySQL product. You must create
        the
   <code class="literal">
    .asc
   </code>
   file with this signature.
  </p>
  <div class="table">
   <a name="idm46045332819760">
   </a>
   <p class="title">
    <b>
     Table 2.2 MySQL Package and Signature Files for MySQL Server MSI for Microsoft
Windows
    </b>
   </p>
   <div class="table-contents">
    <table>
     <colgroup>
      <col style="width: 25%"/>
      <col style="width: 75%"/>
     </colgroup>
     <thead>
      <tr>
       <th>
        File Type
       </th>
       <th>
        File Name
       </th>
      </tr>
     </thead>
     <tbody>
      <tr>
       <td>
        Distribution file
       </td>
       <td>
        <code class="literal">
         mysql-8.4.3-winx64.msi
        </code>
       </td>
      </tr>
      <tr>
       <td>
        Signature file
       </td>
       <td>
        <code class="literal">
         mysql-8.4.3-winx64.msi.asc
        </code>
       </td>
      </tr>
     </tbody>
    </table>
   </div>
  </div>
  <br class="table-break"/>
  <p>
   Make sure that both files are stored in the same directory and
        then run the following command to verify the signature for the
        distribution file. Load the dialog from
   <span class="guimenu">
    File
   </span>
   ,
   <span class="guimenuitem">
    Decrypt/Verify Files...
   </span>
   , and then
        choose the
   <code class="filename">
    .asc
   </code>
   file.
  </p>
  <p>
   The two most common results look like the following figures; and
        although the "The data could not be verified." warning looks
        problematic, the file check passed with success. For additional
        information on what this warning means, click
   <span class="guilabel">
    Show
        Audit Log
   </span>
   and compare it to
   <a class="xref" href="checking-gpg-signature.html" title="2.1.4.2 Signature Checking Using GnuPG">
    Section 2.1.4.2, “Signature Checking Using GnuPG”
   </a>
   . You may now execute
        the MSI file.
  </p>
  <div class="figure">
   <a name="gnupg-kleopatra-decrypt-okay-sig">
   </a>
   <p class="title">
    <b>
     Figure 2.3 Kleopatra: the Decrypt and Verify Results Dialog: Success
    </b>
   </p>
   <div class="figure-contents">
    <div class="mediaobject">
     <img alt="It shows &quot;The data could not be verified&quot;, and also shown is key information, such as the KeyID and email address, the key's sign on date, and also displays the name of the ASC file.." src="images/gnupg-kleopatra-decrypt-okay-sig.png" style="width: 100%; max-width: 628px;"/>
    </div>
   </div>
  </div>
  <br class="figure-break"/>
  <p>
   Seeing an error such as
   <span class="errortext">
    Verification failed: No
        Data.
   </span>
   means the file is invalid. Do not execute the
        MSI file if you see this error.
  </p>
  <div class="figure">
   <a name="gnupg-kleopatra-decrypt-invalid-sig">
   </a>
   <p class="title">
    <b>
     Figure 2.4 Kleopatra: the Decrypt and Verify Results Dialog: Bad
    </b>
   </p>
   <div class="figure-contents">
    <div class="mediaobject">
     <img alt='It shows "Verification failed: No data." and also displays the name of the ASC file.' src="images/gnupg-kleopatra-decrypt-invalid-sig.png" style="width: 100%; max-width: 628px;"/>
    </div>
   </div>
  </div>
  <br class="figure-break"/>
 </div>
 <br/>
</div>
