title: How to calculate RSA public key fingerprint using OpenSSL?
body: <p>I have a RSA public key in an EVP_PKEY structure (loaded from a PEM file starting with -----BEGIN PUBLIC KEY-----). Now I want to be able to display a fingerprint of that key from my code using the OpenSSL API. (The purpose is to allow the operator to verify the key for JWT using RS256 before trusting it). </p>
  
  <p>Unfortunately all resources I found so far either use ssh-keygen on the commandline or do the fingerprint of an X.509 certificate but not the public key.</p>
  
  <p>So how do I get RSA public key fingerprint of a public key stored in a EVP_PKEY structure using the OpenSSL API? </p>