Skip to content

fix: datetime verification evaluation about UTC in issuance and expiration#36

Open
peppelinux wants to merge 1 commit into
IdentityPython:mainfrom
peppelinux:utc-fix
Open

fix: datetime verification evaluation about UTC in issuance and expiration#36
peppelinux wants to merge 1 commit into
IdentityPython:mainfrom
peppelinux:utc-fix

Conversation

@peppelinux

Copy link
Copy Markdown
Member

This pull request improves the handling of date-only validity periods in the MsoIssuer class by introducing a new date parsing method and updating the signing logic to ensure correct interpretation of expiry dates. It also adds a new test to verify that validity intervals are correctly set when issuance and expiry are on the same day.

Date parsing and validity handling improvements:

  • Added a new static method parse_date to MsoIssuer in issuer.py to parse date-only strings and, when appropriate, set the time to the end of the day for expiry dates.
  • Updated the sign method in MsoIssuer to use the new parse_date method for both issuance and expiry dates, ensuring expiry is interpreted as the end of the day.

Testing enhancements:

  • Added a new test test_mso_issuer_validity_same_day to verify that when issuance and expiry dates are the same, the validity interval includes the entire day and the validUntil time is set to 23:59:59.
  • Added necessary imports for datetime and cbor2 in the test file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant