Skip to content

Commit

Permalink
Merge pull request #15 from pvarki/ocsp_lifetime
Browse files Browse the repository at this point in the history
Update default OCSP lifetime
  • Loading branch information
rambo authored Mar 23, 2024
2 parents 7849dfb + a68d17b commit 8e5188f
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.0.2
current_version = 1.0.3
commit = False
tag = False

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "ocsprest"
version = "1.0.2"
version = "1.0.3"
description = ""
authors = ["Eero af Heurlin <eero.afheurlin@iki.fi>"]
readme = "README.rst"
Expand Down
2 changes: 1 addition & 1 deletion src/ocsprest/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""Quick and dirty rest API to call the ocsp signing methods for CFSSL CLI"""
__version__ = "1.0.2"
__version__ = "1.0.3"
2 changes: 2 additions & 0 deletions src/ocsprest/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ class RESTConfig(BaseSettings):
description="Location to dump the DER CRL to, .PEM version will also be created", default="/ca_public/crl.der"
)
crl_lifetime: str = Field(description="Lifetime to pass to CFSSL", default="1800s")
# OCSP responder rounds the response nextupdate in funky ways so less than 1h will lead to weird results
ocsp_lifetime: str = Field(description="Lifetime to pass to CFSSL", default="1h")
crl_refresh: int = Field(description="Interval to dump CRL via out background task", default=900)

ci: bool = Field(default=False, alias="CI", description="Are we running in CI")
Expand Down
2 changes: 1 addition & 1 deletion src/ocsprest/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ async def refresh_oscp() -> int:
f"-ca-key {cnf.cakey}",
f"-responder {cnf.respcrt}",
f"-responder-key {cnf.respkey}",
f"-interval {cnf.crl_lifetime}",
f"-interval {cnf.ocsp_lifetime}",
f"-loglevel {cfssl_loglevel()}",
]
cmd = " ".join(args)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_ocsprest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

def test_version() -> None:
"""Make sure version matches expected"""
assert __version__ == "1.0.2"
assert __version__ == "1.0.3"


def test_healthcheck(client: TestClient) -> None:
Expand Down

0 comments on commit 8e5188f

Please sign in to comment.