X.509 certificates are a common way to exchange and distribute public key information. For example, most Open Social containers use the OAuth RSA-SHA1 signature method and distribute their public keys in the X.509 format.
While working on an AppEngine application, I needed to verify requests from such containers. However, there is (currently) no pure Python library capable of parsing the certificates. This meant that I needed to extract the public key out of the certificate manually and store it in some parsed way inside the Python code.
Fortunately, parsing public keys from an X.509 certificate and representing them as a hex number turned out to be simple and easy.
Continue reading Extract Public Key from X.509 Certificate as Hex