Skip to content

Commit

Permalink
Pass the OCSP responder uri to CSR method
Browse files Browse the repository at this point in the history
  • Loading branch information
rambo committed Feb 7, 2024
1 parent f7be753 commit 08365f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/takrmapi/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,8 @@ def read_deployment_name() -> str:
# Used for mission pkgs
TAK_SERVER_FQDN: str = cfg("TAK_SERVER_FQDN", cast=str, default=read_tak_fqdn())
TAK_SERVER_NAME: str = cfg("TAK_SERVER_NAME", cast=str, default=read_deployment_name())

# due to CFSSL issues we add this directly to CSR
OCSP_RESPONDER: str = cfg(
"OCSP_RESPONDER", cast=str, default="https://localmaeher.pvarki.fi:4439/ca/ocsp" # needs to be the public URL
)
2 changes: 1 addition & 1 deletion src/takrmapi/tak_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ async def create_user_dir_and_files(self) -> None:
certpath = self.userdata / f"{certcn}.pem"

ckp = await async_create_keypair(privpath, pubpath)
csrpem = await async_create_client_csr(ckp, csrpath, {"CN": self.certcn})
csrpem = await async_create_client_csr(ckp, csrpath, {"CN": self.certcn}, ocsp_uri=config.OCSP_RESPONDER)

async with (await self.helpers.tak_mtls_client()) as session:
url = f"{self.rm_base}api/v1/product/sign_csr/mtls"
Expand Down

0 comments on commit 08365f6

Please sign in to comment.