diff --git a/CHANGELOG.md b/CHANGELOG.md index 39e0825..e583a40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ ### Unreleased +### v0.10.1 (2023-10-16) + +#### Fixes + +- Fixed regression that prevented TLS client certificates and other + TLS environment variables from being initialized. + ### v0.10.0 (2023-10-15) #### Features diff --git a/jetforce/__version__.py b/jetforce/__version__.py index 61fb31c..1f4c4d4 100644 --- a/jetforce/__version__.py +++ b/jetforce/__version__.py @@ -1 +1 @@ -__version__ = "0.10.0" +__version__ = "0.10.1" diff --git a/jetforce/protocol.py b/jetforce/protocol.py index 8d0347b..8e61ebc 100644 --- a/jetforce/protocol.py +++ b/jetforce/protocol.py @@ -215,7 +215,12 @@ def build_environ(self) -> EnvironDict: "SERVER_PROTOCOL": "GEMINI", "SERVER_SOFTWARE": f"jetforce/{__version__}", } - if not self.transport.TLS: + + try: + cert = self.transport.getPeerCertificate() + except AttributeError: + # We're not using a TLS-enabled transport, we can skip + # all of the TLS environment initialization below. return environ conn = self.transport.getHandle() @@ -230,7 +235,6 @@ def build_environ(self) -> EnvironDict: } ) - cert = self.transport.getPeerCertificate() if cert: x509_cert = cert.to_cryptography() cert_data = inspect_certificate(x509_cert) diff --git a/setup.py b/setup.py index 84194e1..ade66c6 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ def long_description() -> str: setuptools.setup( name="Jetforce", - version="0.10.0", + version="0.10.1", url="https://github.com/michael-lazar/jetforce", license="Other/Proprietary License", author="Michael Lazar",