tlslite.x509.X509

Package tlslite :: Module x509 :: Class X509 |
[hide private]
[frames] | no frames]

# Class X509

source code

This class represents an X.509 certificate.

Instance Methods | [hide private]
__init__(self) | source code
str |
getFingerprint(self) Get the hex-encoded fingerprint of this certificate. | source code
parse(self, s) Parse a PEM-encoded X.509 certificate. | source code
parseBinary(self, bytes) Parse a DER-encoded X.509 certificate. | source code
writeBytes(self) | source code

Instance Variables | [hide private]
`bytearray` of unsigned bytes | bytes The DER-encoded ASN.1 certificate
tlslite.utils.rsakey.RSAKey | publicKey The subject public key from the certificate.
`bytearray` of unsigned bytes | subject The DER-encoded ASN.1 subject distinguished name.

Method Details | [hide private]

### getFingerprint(self) | source code
Get the hex-encoded fingerprint of this certificate. Returns: str A hex-encoded fingerprint.

### parse(self, s) | source code
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(self, bytes) | source code
Parse a DER-encoded X.509 certificate. Parameters: `bytes` (str or `bytearray` of unsigned bytes) - A DER-encoded X.509 certificate.