# Given a PEM encoded X.509 certificate, outputs # base64(SHA256(subject || spki)) # where `subject` is the RFC 5280 RDNSequence encoding # the certificate's subject, and `spki` is the RFC 5280 # SubjectPublicKeyInfo field encoding the certificate's # public key.
import sys import base64
from cryptography import x509 from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives import hashes
if len(sys.argv) != 2:
print(f"Usage: {sys.argv[0]} ")
sys.exit(1)
with open(sys.argv[1], "r") as f:
cert = x509.load_pem_x509_certificate(f.read().encode("utf-8"), backend=None)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.