forked from pool/python-pyOpenSSL
- Add patch fix_test_suite.patch to allow test suite to pass with
OpenSSL 1.1.1. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyOpenSSL?expand=0&rev=50
This commit is contained in:
29
fix_test_suite.patch
Normal file
29
fix_test_suite.patch
Normal file
@@ -0,0 +1,29 @@
|
||||
--- a/tests/test_crypto.py
|
||||
+++ b/tests/test_crypto.py
|
||||
@@ -13,7 +13,7 @@ from datetime import datetime, timedelta
|
||||
|
||||
import pytest
|
||||
|
||||
-from six import binary_type
|
||||
+from six import binary_type, PY3
|
||||
|
||||
from cryptography import x509
|
||||
from cryptography.hazmat.backends.openssl.backend import backend
|
||||
@@ -3167,9 +3167,14 @@ class TestCRL(object):
|
||||
# and with what certificate it was exported.
|
||||
text.index(b'Serial Number: 03AB')
|
||||
text.index(b'Superseded')
|
||||
- text.index(
|
||||
- b'Issuer: /C=US/ST=IL/L=Chicago/O=Testing/CN=Testing Root CA'
|
||||
- )
|
||||
+ if PY3:
|
||||
+ text.decode().translate(str.maketrans('','',',/ ')).index(
|
||||
+ 'Issuer:C=USST=ILL=ChicagoO=TestingCN=TestingRootCA'
|
||||
+ )
|
||||
+ else:
|
||||
+ text.translate(None, ',/ ').index(
|
||||
+ 'Issuer:C=USST=ILL=ChicagoO=TestingCN=TestingRootCA'
|
||||
+ )
|
||||
|
||||
def test_export_der(self):
|
||||
"""
|
Reference in New Issue
Block a user