File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -1665,8 +1665,7 @@ def add_extensions(
1665
1665
raise ValueError ("One of the elements is not an X509Extension" )
1666
1666
1667
1667
add_result = _lib .X509_add_ext (self ._x509 , ext ._extension , - 1 )
1668
- if not add_result :
1669
- _raise_current_error ()
1668
+ _openssl_assert (add_result == 1 )
1670
1669
1671
1670
def get_extension (self , index : int ) -> _X509ExtensionInternal :
1672
1671
"""
@@ -1777,9 +1776,7 @@ def add_crl(
1777
1776
1778
1777
bio = _new_mem_buf (crl .public_bytes (Encoding .DER ))
1779
1778
openssl_crl = _lib .d2i_X509_CRL_bio (bio , _ffi .NULL )
1780
- if openssl_crl == _ffi .NULL :
1781
- _raise_current_error ()
1782
-
1779
+ _openssl_assert (openssl_crl != _ffi .NULL )
1783
1780
crl = _ffi .gc (openssl_crl , _lib .X509_CRL_free )
1784
1781
elif isinstance (crl , _CRLInternal ):
1785
1782
crl = crl ._crl
You can’t perform that action at this time.
0 commit comments