Change certificate fingerprint to use url-safe base64 encoding
This commit is contained in:
parent
0c1483c9d5
commit
af41d12157
|
@ -1,5 +1,14 @@
|
||||||
# Jetforce Changelog
|
# Jetforce Changelog
|
||||||
|
|
||||||
|
### v0.3.1
|
||||||
|
|
||||||
|
#### Bugfixes
|
||||||
|
|
||||||
|
- The client certificate fingerprint hash is now encoded using a URL-safe
|
||||||
|
version of the base64 algorithm (urlsafe_b64encode)[https://docs.python.org/3/library/base64.html#base64.urlsafe_b64encode].
|
||||||
|
This is intended to make it simpler for applications and CGI scripts to
|
||||||
|
use the certificate fingerprint in URL paths.
|
||||||
|
|
||||||
### v0.3.0
|
### v0.3.0
|
||||||
|
|
||||||
This release brings some major improvements and necessary refactoring of the
|
This release brings some major improvements and necessary refactoring of the
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
__version__ = "0.3.0"
|
__version__ = "0.3.1"
|
||||||
|
|
|
@ -23,7 +23,7 @@ def inspect_certificate(cert: x509) -> dict:
|
||||||
common_name = name_attrs[0].value if name_attrs else ""
|
common_name = name_attrs[0].value if name_attrs else ""
|
||||||
|
|
||||||
fingerprint_bytes = cert.fingerprint(hashes.SHA256())
|
fingerprint_bytes = cert.fingerprint(hashes.SHA256())
|
||||||
fingerprint = base64.b64encode(fingerprint_bytes).decode()
|
fingerprint = base64.urlsafe_b64encode(fingerprint_bytes).decode()
|
||||||
|
|
||||||
not_before = cert.not_valid_before.strftime("%Y-%m-%dT%H:%M:%SZ")
|
not_before = cert.not_valid_before.strftime("%Y-%m-%dT%H:%M:%SZ")
|
||||||
not_after = cert.not_valid_after.strftime("%Y-%m-%dT%H:%M:%SZ")
|
not_after = cert.not_valid_after.strftime("%Y-%m-%dT%H:%M:%SZ")
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -10,7 +10,7 @@ def long_description():
|
||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name="Jetforce",
|
name="Jetforce",
|
||||||
version="0.3.0",
|
version="0.3.1",
|
||||||
url="https://github.com/michael-lazar/jetforce",
|
url="https://github.com/michael-lazar/jetforce",
|
||||||
license="Other/Proprietary License",
|
license="Other/Proprietary License",
|
||||||
author="Michael Lazar",
|
author="Michael Lazar",
|
||||||
|
|
Loading…
Reference in New Issue