<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="checking-rpm-signature">
      </a>
      2.1.4.4 Signature Checking Using RPM
     </h4>
    </div>
   </div>
  </div>
  <p>
   For RPM packages, there is no separate signature. RPM packages
        have a built-in GPG signature and MD5 checksum. You can verify a
        package by running the following command:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa81136774"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">$&gt; </span><span class="token command">rpm</span> <span class="token property">--checksig</span> <em class="replaceable">package_name</em><span class="token punctuation">.</span>rpm</code></pre>
  </div>
  <p>
   Example:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa40753713"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">$&gt; </span><span class="token command">rpm</span> <span class="token property">--checksig</span> mysql-community-server-8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>3-1<span class="token punctuation">.</span>el8<span class="token punctuation">.</span>x86_64<span class="token punctuation">.</span>rpm
mysql-community-server-8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>3-1<span class="token punctuation">.</span>el8<span class="token punctuation">.</span>x86_64<span class="token punctuation">.</span>rpm<span class="token punctuation">:</span> digests signatures OK</code></pre>
  </div>
  <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
   <div class="admon-title">
    Note
   </div>
   <p>
    If you are using RPM 4.1 and it complains about
    <code class="literal">
     (GPG)
          NOT OK (MISSING KEYS: GPG#a8d3785c)
    </code>
    , even though you
          have imported the MySQL public build key into your own GPG
          keyring, you need to import the key into the RPM keyring
          first. RPM 4.1 no longer uses your personal GPG keyring (or
          GPG itself). Rather, RPM maintains a separate keyring because
          it is a system-wide application and a user's GPG public
          keyring is a user-specific file. To import the MySQL public
          key into the RPM keyring, first obtain the key, then use
    <span class="command">
     <strong>
      rpm --import
     </strong>
    </span>
    to import the key. For
          example:
   </p>
  </div>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa65151823"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">$&gt; </span><span class="token command">gpg</span> <span class="token property">--export</span> <span class="token property">-a</span> a8d3785c &gt; a8d3785c<span class="token punctuation">.</span>asc
<span class="token prompt">$&gt; </span><span class="token command">rpm</span> <span class="token property">--import</span> a8d3785c<span class="token punctuation">.</span>asc</code></pre>
  </div>
  <p>
   Alternatively,
   <span class="command">
    <strong>
     rpm
    </strong>
   </span>
   also supports loading the
        key directly from a URL:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa72004384"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">$&gt; </span><span class="token command">rpm</span> <span class="token property">--import</span> https<span class="token punctuation">:</span>//repo<span class="token punctuation">.</span>mysql<span class="token punctuation">.</span>com/RPM-GPG-KEY-mysql-2023</code></pre>
  </div>
  <p>
   You can also obtain the MySQL public key from this manual page:
   <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>
   .
  </p>
 </div>
 <br/>
</div>
