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

# Class X509

source code

    object --+
             |
            X509

This class represents an X.509 certificate.

Instance Methods | [hide private]
__init__(self) x.__init__(...) initializes x; see help(type(x)) for signature | 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
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

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.

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self) (Constructor) | source code
x.__init__(...) initializes x; see help(type(x)) for signature Overrides: object.__init__ (inherited documentation)

### 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.