We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I'm trying to use pyopenssl with ndg and the following error occurs in con.getresponse():
Error Raise WantReadError () OpenSSL.SSL.WantReadError
Code:
from OpenSSL import crypto , SSL from ndg.httpsclient.https import HTTPSConnection
pkcs12 = crypto.load_pkcs12(open('certi.pfx', 'rb').read(), 'pass') certi = crypto.dump_certificate( crypto.FILETYPE_PEM , pkcs12.get_certificate() ) key = crypto.dump_privatekey( crypto.FILETYPE_PEM , pkcs12.get_privatekey() )
cert_openssl = crypto.load_certificate(crypto.FILETYPE_PEM, certi) key_openssl = crypto.load_privatekey(crypto.FILETYPE_PEM, key) ctx = SSL.Context(SSL.SSLv23_METHOD) ctx.use_certificate(cert_openssl) ctx.use_privatekey(key_openssl)
con = HTTPSConnection('server', port=443, ssl_context=ctx) con.connect() con.request( b'POST', b'/' + cURL.encode('utf-8'), xml_soap.encode('utf-8'), header)
resp = con.getresponse()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
I'm trying to use pyopenssl with ndg and the following error occurs in con.getresponse():
Error
Raise WantReadError ()
OpenSSL.SSL.WantReadError
Code:
from OpenSSL import crypto , SSL
from ndg.httpsclient.https import HTTPSConnection
pkcs12 = crypto.load_pkcs12(open('certi.pfx', 'rb').read(), 'pass')
certi = crypto.dump_certificate( crypto.FILETYPE_PEM , pkcs12.get_certificate() )
key = crypto.dump_privatekey( crypto.FILETYPE_PEM , pkcs12.get_privatekey() )
cert_openssl = crypto.load_certificate(crypto.FILETYPE_PEM, certi)
key_openssl = crypto.load_privatekey(crypto.FILETYPE_PEM, key)
ctx = SSL.Context(SSL.SSLv23_METHOD)
ctx.use_certificate(cert_openssl)
ctx.use_privatekey(key_openssl)
con = HTTPSConnection('server', port=443, ssl_context=ctx)
con.connect()
con.request( b'POST', b'/' + cURL.encode('utf-8'), xml_soap.encode('utf-8'), header)
resp = con.getresponse()
The text was updated successfully, but these errors were encountered: