Skip to content

Commit

Permalink
fix: remove deprecated functions (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
fulder authored Nov 5, 2023
1 parent 73817fa commit 3bae4c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pki_tools/types/certificate.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def from_pem_string(cls: Type["Certificate"], cert_pem) -> "Certificate":
exceptions.CertLoadError - If the certificate could not be loaded
"""
try:
cert_pem = re.sub("\n\s*", "\n", cert_pem)
cert_pem = re.sub(r"\n\s*", "\n", cert_pem)
if not _is_pem_string(cert_pem):
raise ValueError

Expand Down
5 changes: 3 additions & 2 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,11 @@ def _create_cert(key_pair, add_crl_extension=True, add_aia_extension=True):
key_pair.public_key(),
)
.not_valid_before(
datetime.datetime.utcnow(),
datetime.datetime.now(datetime.timezone.utc),
)
.not_valid_after(
datetime.datetime.utcnow() + datetime.timedelta(days=10),
datetime.datetime.now(datetime.timezone.utc)
+ datetime.timedelta(days=10),
)
)

Expand Down

0 comments on commit 3bae4c8

Please sign in to comment.