tlslite.X509.X509

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

## Class X509

This class represents an X.509 certificate.

Method Summary
| `__init__(self)`
str or None | ``getCommonName`(self)` Get the Subject's Common Name from the certificate.
str | ``getFingerprint`(self)` Get the hex-encoded fingerprint of this certificate.
| ``parse`(self, s)` Parse a PEM-encoded X.509 certificate.
| ``parseBinary`(self, bytes)` Parse a DER-encoded X.509 certificate.
| `writeBytes(self)`

Instance Variable Summary
`array.array` of unsigned bytes | `bytes`: The DER-encoded ASN.1 certificate
`tlslite.utils.RSAKey.RSAKey` | `publicKey`: The subject public key from the certificate.

Method Details

### getCommonName(self) Get the Subject's Common Name from the certificate. The cryptlib_py module must be installed in order to use this function. Returns: The CN component of the certificate's subject DN, if present. (type=str or None)

### getFingerprint(self) Get the hex-encoded fingerprint of this certificate. Returns: A hex-encoded fingerprint. (type=str)

### parse(self, s) Parse a PEM-encoded X.509 certificate. Parameters: `s` - A PEM-encoded X.509 certificate (i.e. a base64-encoded certificate wrapped with "-----BEGIN CERTIFICATE-----" and "-----END CERTIFICATE-----" tags). (type=str)

### parseBinary(self, bytes) Parse a DER-encoded X.509 certificate. Parameters: `bytes` - A DER-encoded X.509 certificate. (type=str or `array.array` of unsigned bytes)

Instance Variable Details

### bytes The DER-encoded ASN.1 certificate Type: `array.array` of unsigned bytes

### publicKey The subject public key from the certificate. Type: `tlslite.utils.RSAKey.RSAKey`

Generated by Epydoc 2.0 on Mon Feb 21 21:56:54 2005 | http://epydoc.sf.net