title: Fingerprint of RSA public key
body: <p>I'm trying to get a fingerprint from a public key created as below:</p>
  <pre><code>openssl genrsa -out test.pem -aes128 -passout pass:testphrase 2048
  openssl rsa -pubout -in test.pem -out test_public.pem -passin pass:testphrase
  </code></pre>
  <p>I'm uploading the public key to my cloud provider which confirms the fingerprint to be <code>70:d6:cb:9c:c7:95:ad:6f:49:84:4f:d1:fb:71:a8:53</code> and I can get the fingerprint from the private key using this command</p>
  <pre><code>openssl rsa -in test.pem -pubout -outform DER | openssl md5 -c
  
  (stdin)= 70:d6:cb:9c:c7:95:ad:6f:49:84:4f:d1:fb:71:a8:53
  </code></pre>
  <p>I've tried</p>
  <pre><code>openssl rsa -pubin test_public.pem -pubout -outform DER | openssl md5 -c
  </code></pre>
  <p>But this gives me <code>d4:1d:8c:d9:8f:00:b2:04:e9:80:09:98:ec:f8:42:7e</code>.
  I'd like to get the fingerprint directly from the public key, I feel like I'm missing something simple here.</p>