tlslite.X509CertChain.X509CertChain

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

## Class X509CertChain

This class represents a chain of X.509 certificates.

Method Summary
| ``__init__`(self, x509List)` Create a new X509CertChain.
str or None | ``getCommonName`(self)` Get the Subject's Common Name from the end-entity certificate.
`tlslite.utils.RSAKey.RSAKey` | ``getEndEntityPublicKey`(self)` Get the public key from the end-entity certificate.
str | ``getFingerprint`(self)` Get the hex-encoded fingerprint of the end-entity certificate.
int | ``getNumCerts`(self)` Get the number of certificates in this chain.
| ``validate`(self, x509TrustList)` Check the validity of the certificate chain.

Instance Variable Summary
list | `x509List`: A list of `tlslite.X509.X509` instances, starting with the end-entity certificate and with every subsequent certificate certifying the previous.

Method Details

### __init__(self, x509List=None) (Constructor) Create a new X509CertChain. Parameters: `x509List` - A list of `tlslite.X509.X509` instances, starting with the end-entity certificate and with every subsequent certificate certifying the previous. (type=list)

### getCommonName(self) Get the Subject's Common Name from the end-entity 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)

### getEndEntityPublicKey(self) Get the public key from the end-entity certificate. Returns: `tlslite.utils.RSAKey.RSAKey`

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

### getNumCerts(self) Get the number of certificates in this chain. Returns: int

### validate(self, x509TrustList) Check the validity of the certificate chain. This checks that every certificate in the chain validates with the subsequent one, until some certificate validates with (or is identical to) one of the passed-in root certificates. The cryptlib_py module must be installed in order to use this function. Parameters: `x509TrustList` - A list of trusted root certificates. The certificate chain must extend to one of these certificates to be considered valid. (type=list of `tlslite.X509.X509`)

Instance Variable Details

### x509List A list of `tlslite.X509.X509` instances, starting with the end-entity certificate and with every subsequent certificate certifying the previous. Type: list

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