summaryrefslogtreecommitdiff
path: root/src/OpenSSL/crypto.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2020-10-27 00:15:17 -0400
committerGitHub <noreply@github.com>2020-10-26 21:15:17 -0700
commit124a0134fdb7decb0136b4b6f7892b87b919e74e (patch)
tree01a47b984f122ec7891185010f8f96c30ccce6fb /src/OpenSSL/crypto.py
parent669dcc3488a4803b2c321218def6554805940c48 (diff)
downloadpyopenssl-124a0134fdb7decb0136b4b6f7892b87b919e74e.tar.gz
Drop CI for OpenSSL 1.0.2 (#953)
* Drop CI for OpenSSL 1.0.2 * Delete code for coverage reasons * Bump minimum cryptography version
Diffstat (limited to 'src/OpenSSL/crypto.py')
-rw-r--r--src/OpenSSL/crypto.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/OpenSSL/crypto.py b/src/OpenSSL/crypto.py
index 11be813..84f92b1 100644
--- a/src/OpenSSL/crypto.py
+++ b/src/OpenSSL/crypto.py
@@ -1603,16 +1603,8 @@ class X509Store(object):
if not isinstance(cert, X509):
raise TypeError()
- # As of OpenSSL 1.1.0i adding the same cert to the store more than
- # once doesn't cause an error. Accordingly, this code now silences
- # the error for OpenSSL < 1.1.0i as well.
- if _lib.X509_STORE_add_cert(self._store, cert._x509) == 0:
- code = _lib.ERR_peek_error()
- err_reason = _lib.ERR_GET_REASON(code)
- _openssl_assert(
- err_reason == _lib.X509_R_CERT_ALREADY_IN_HASH_TABLE
- )
- _lib.ERR_clear_error()
+ res = _lib.X509_STORE_add_cert(self._store, cert._x509)
+ _openssl_assert(res == 1)
def add_crl(self, crl):
"""