Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
grindsa committed Feb 6, 2024
2 parents 6b6d6a9 + 56550d0 commit bdb1ddc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ This is a high-level summary of the most important changes. For a full list of
changes, see the [git commit log](https://github.com/grindsa/acme2certifier/commits)
and pick the appropriate release branch.

# Changes in 0.33.1

**Bugfixes**:

- [132](https://github.com/grindsa/acme2certifier/issues/132) - returning serial numbers in hex-format with leading zero

# Changes in 0.33

**Upgrade notes**:
Expand Down
2 changes: 2 additions & 0 deletions acme_srv/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,8 @@ def cert_serial_get(logger: logging.Logger, certificate: str, hexformat: bool =
cert = cert_load(logger, certificate, recode=True)
if hexformat:
serial_number = f'{cert.serial_number:x}'
# add leading zero if needed
serial_number = serial_number.zfill(len(serial_number) + len(serial_number) % 2)
else:
serial_number = cert.serial_number
logger.debug('cert_serial_get() ended with: %s', serial_number)
Expand Down
2 changes: 1 addition & 1 deletion acme_srv/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
# 1) we don't load dependencies by storing it in __init__.py
# 2) we can import it in setup.py for the same reason
# 3) we can import it into your module module
__version__ = '0.33'
__version__ = '0.33.1'
__dbversion__ = '0.33'
2 changes: 1 addition & 1 deletion test/test_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def test_043_helper_cert_serial_get(self):
bta75ocePrurdNxsxKJhLlXbnKD6lurCb4khRhrmLmpK8JxhuaevEVklSQX0gqlR
fxAH4XQsaqcaedPNI+W5OUITMz40ezDCbUqxS9KEMCGPoOTXNRAjbr72sc4Vkw7H
t+eRUDECE+0UnjyeCjTn3EU="""
self.assertEqual('a', self.cert_serial_get(self.logger, cert, hexformat=True))
self.assertEqual('0a', self.cert_serial_get(self.logger, cert, hexformat=True))

def test_044_helper_cert_issuer_get(self):
""" test cert_issuer_get """
Expand Down

0 comments on commit bdb1ddc

Please sign in to comment.