aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cryptography/hazmat/backends/openssl/x509.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/cryptography/hazmat/backends/openssl/x509.py b/src/cryptography/hazmat/backends/openssl/x509.py
index b342cd8a..4699a7a5 100644
--- a/src/cryptography/hazmat/backends/openssl/x509.py
+++ b/src/cryptography/hazmat/backends/openssl/x509.py
@@ -864,14 +864,13 @@ class _CertificateRevocationList(object):
def _revoked_certificates(self):
revoked = self._backend._lib.X509_CRL_get_REVOKED(self._x509_crl)
revoked_list = []
- if revoked != self._backend._ffi.NULL:
- for i in range(len(self)):
- r = self._backend._lib.sk_X509_REVOKED_value(revoked, i)
- self._backend.openssl_assert(r != self._backend._ffi.NULL)
- revoked_certificate = _RevokedCertificate(
- self._backend, self, r
- )
- revoked_list.append(revoked_certificate)
+ for i in range(len(self)):
+ r = self._backend._lib.sk_X509_REVOKED_value(revoked, i)
+ self._backend.openssl_assert(r != self._backend._ffi.NULL)
+ revoked_certificate = _RevokedCertificate(
+ self._backend, self, r
+ )
+ revoked_list.append(revoked_certificate)
return revoked_list