def add_cert(self, cert):
if not isinstance(cert, X509):<EOL><INDENT>raise TypeError()<EOL><DEDENT>if _lib.X509_STORE_add_cert(self._store, cert._x509) == <NUM_LIT:0>:<EOL><INDENT>code = _lib.ERR_peek_error()<EOL>err_reason = _lib.ERR_GET_REASON(code)<EOL>_openssl_assert(<EOL>err_reason == _lib.X509_R_CERT_ALREADY_IN_HASH_TABLE<EOL>)<EOL>_lib.ERR_clear_error()<EOL><DEDENT>
Adds a trusted certificate to this store.

Adding a certificate with this method adds this certificate as a
*trusted* certificate.

:param X509 cert: The certificate to add to this store.

:raises TypeError: If the certificate is not an :class:`X509`.

:raises OpenSSL.crypto.Error: If OpenSSL was unhappy with your
    certificate.

:return: ``None`` if the certificate was added successfully.