tlslite.x509 module¶
Class representing an X.509 certificate.
-
class
tlslite.x509.
X509
¶ Bases:
object
This class represents an X.509 certificate.
- Variables
-
__init__
()¶ Create empty certificate object.
-
getFingerprint
()¶ Get the hex-encoded fingerprint of this certificate.
- Return type
- Returns
A hex-encoded fingerprint.
-
parse
(s)¶ Parse a PEM-encoded X.509 certificate.
- Parameters
s (str) – A PEM-encoded X.509 certificate (i.e. a base64-encoded certificate wrapped with “—–BEGIN CERTIFICATE—–” and “—–END CERTIFICATE—–” tags).
-
parseBinary
(bytes)¶ Parse a DER-encoded X.509 certificate.
- Parameters
bytes (L{str} (in python2) or L{bytearray} of unsigned bytes) – A DER-encoded X.509 certificate.
-
writeBytes
()¶ Serialise object to a DER encoded string.