From 5e0fd57f936112746b13b78db807e5bb9e9c94bc Mon Sep 17 00:00:00 2001 From: Michael Lazar Date: Sun, 19 Apr 2020 22:06:06 -0400 Subject: [PATCH] Allow a client certificate subject's CN to be blank. --- CHANGELOG.md | 2 ++ jetforce.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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"],