Skip to content

Commit

Permalink
use the enum names for cert file names
Browse files Browse the repository at this point in the history
  • Loading branch information
rambo committed Jan 28, 2024
1 parent 6f9e1dc commit 8acd4f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ocsprest/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ class CRLType(enum.IntEnum):
def crlpaths(crltype: CRLType = CRLType.MERGED) -> Tuple[Path, Path]:
"""Path to CRL files by CRLType"""
cnf = RESTConfig.singleton()
der_path = cnf.crl.parent / f"{cnf.crl.stem}_{crltype}.der"
pem_path = cnf.crl.parent / f"{cnf.crl.stem}_{crltype}.pem"
der_path = cnf.crl.parent / f"{cnf.crl.stem}_{crltype.name.lower()}.der"
pem_path = cnf.crl.parent / f"{cnf.crl.stem}_{crltype.name.lower()}.pem"
return der_path, pem_path


Expand Down
2 changes: 2 additions & 0 deletions src/ocsprest/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ async def call_dump_crl(request: web.Request) -> web.Response:
)
return web.json_response({"success": True})


async def get_crl_pem(request: web.Request) -> web.Response:
"""Dump CRL to shared directory, triggering reloads for everyone interested in it is beyond us though"""
_ = request
Expand All @@ -97,6 +98,7 @@ async def get_crl_pem(request: web.Request) -> web.Response:
_, pem_path = crlpaths()
return web.Response(body=pem_path.read_bytes(), content_type="application/x-pem-file")


async def get_crl_der(request: web.Request) -> web.Response:
"""Dump CRL to shared directory, triggering reloads for everyone interested in it is beyond us though"""
_ = request
Expand Down

0 comments on commit 8acd4f9

Please sign in to comment.