diff options
author | Jakub Warmuz <jakub@warmuz.org> | 2015-05-13 10:59:13 +0300 |
---|---|---|
committer | Jakub Warmuz <jakub@warmuz.org> | 2015-07-06 15:18:17 +0300 |
commit | 9197fa6b5c2114e0f3e141843b197626be10a00d (patch) | |
tree | 1f844b6f5f300192d0efa20c9c507261189adc2a /examples | |
parent | e0293d81f3263ab958d041374c19634b335b35eb (diff) |
acme: M2Crypto -> pyOpenSSL
Diffstat (limited to 'examples')
-rw-r--r-- | examples/acme_client.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/acme_client.py b/examples/acme_client.py index e67759583..f7e3916d8 100644 --- a/examples/acme_client.py +++ b/examples/acme_client.py @@ -5,7 +5,7 @@ import pkg_resources from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.asymmetric import rsa -import M2Crypto +import OpenSSL from acme import client from acme import messages @@ -39,9 +39,9 @@ logging.debug(authzr) authzr, authzr_response = acme.poll(authzr) -csr = M2Crypto.X509.load_request_string(pkg_resources.resource_string( - 'acme.jose', os.path.join('testdata', 'csr.der')), - M2Crypto.X509.FORMAT_DER) +csr = OpenSSL.crypto.load_certificate_request( + OpenSSL.crypto.FILETYPE_ASN1, pkg_resources.resource_string( + 'acme.jose', os.path.join('testdata', 'csr.der'))) try: acme.request_issuance(csr, (authzr,)) except messages.Error as error: |