This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author christian.heimes
Recipients christian.heimes, cvrebert, maker, pitrou, underrun
Date 2018-01-12.09:27:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1515749241.38.0.467229070634.issue18369@psf.upfronthosting.co.za>
In-reply-to
Content
API example:

>>> import ssl

>>> chain = ssl.Certificate.chain_from_file("Lib/test/ssl_cert.pem")
>>> cas = ssl.Certificate.bundle_from_file("Lib/test/pycacert.pem")
>>> pkey = ssl.PrivateKey.from_file("Lib/test/ssl_key.passwd.pem")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ssl.SSLError: [PEM: BAD_PASSWORD_READ] bad password read (_ssl.c:58)
>>> pkey = ssl.PrivateKey.from_file("Lib/test/ssl_key.passwd.pem", password="somepass")

>>> chain
(<_ssl.Certificate '/C=XY/L=Castle Anthrax/O=Python Software Foundation/CN=localhost'>,)
>>> cas
[<_ssl.Certificate '/C=XY/O=Python Software Foundation CA/CN=our-ca-server'>]

>>> ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
>>> ctx.load_cert_chain(chain, pkey)
>>> ctx.load_verify_locations(cadata=cas)
History
Date User Action Args
2018-01-12 09:27:21christian.heimessetrecipients: + christian.heimes, pitrou, cvrebert, maker, underrun
2018-01-12 09:27:21christian.heimessetmessageid: <1515749241.38.0.467229070634.issue18369@psf.upfronthosting.co.za>
2018-01-12 09:27:21christian.heimeslinkissue18369 messages
2018-01-12 09:27:21christian.heimescreate