diff --git a/CHANGELOG.md b/CHANGELOG.md index fcec033..a03e57b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ### Unreleased +- Allow a client certificate subject's CN to be blank. + ### v0.2.2 (2012-03-31) - Fix a regression in path matching for the static directory application. diff --git a/jetforce.py b/jetforce.py index 8f33a9a..79aa538 100755 --- a/jetforce.py +++ b/jetforce.py @@ -529,7 +529,7 @@ class GeminiRequestHandler: environ.update( { "AUTH_TYPE": "CERTIFICATE", - "REMOTE_USER": subject["commonName"], + "REMOTE_USER": subject.get("commonName", ""), "TLS_CLIENT_NOT_BEFORE": self.client_cert["notBefore"], "TLS_CLIENT_NOT_AFTER": self.client_cert["notAfter"], "TLS_CLIENT_SERIAL_NUMBER": self.client_cert["serialNumber"],