Allow a client certificate subject's CN to be blank.

This commit is contained in:
Michael Lazar 2020-04-19 22:06:06 -04:00
parent ff2832f034
commit 5e0fd57f93
2 changed files with 3 additions and 1 deletions

View File

@ -2,6 +2,8 @@
### Unreleased ### Unreleased
- Allow a client certificate subject's CN to be blank.
### v0.2.2 (2012-03-31) ### v0.2.2 (2012-03-31)
- Fix a regression in path matching for the static directory application. - Fix a regression in path matching for the static directory application.

View File

@ -529,7 +529,7 @@ class GeminiRequestHandler:
environ.update( environ.update(
{ {
"AUTH_TYPE": "CERTIFICATE", "AUTH_TYPE": "CERTIFICATE",
"REMOTE_USER": subject["commonName"], "REMOTE_USER": subject.get("commonName", ""),
"TLS_CLIENT_NOT_BEFORE": self.client_cert["notBefore"], "TLS_CLIENT_NOT_BEFORE": self.client_cert["notBefore"],
"TLS_CLIENT_NOT_AFTER": self.client_cert["notAfter"], "TLS_CLIENT_NOT_AFTER": self.client_cert["notAfter"],
"TLS_CLIENT_SERIAL_NUMBER": self.client_cert["serialNumber"], "TLS_CLIENT_SERIAL_NUMBER": self.client_cert["serialNumber"],