Skip to content

Commit

Permalink
Fix: use str instead of Path for client_certificate in SgxDockerConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
grydz committed Dec 20, 2024
1 parent 599eb02 commit a83d8b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion cli/cenclave/src/cenclave/command/sgx_operator/spawn.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ def run(args) -> None:
subject_alternative_name=args.san,
app_id=uuid4(),
expiration_date=int((datetime.today() + timedelta(days=args.days)).timestamp()),
client_certificate=args.client_certificate,
client_certificate=(
args.client_certificate.read_text() if args.client_certificate else None
),
app_dir=workspace,
application=code_config.python_application,
healthcheck=code_config.healthcheck_endpoint,
Expand Down
4 changes: 2 additions & 2 deletions cli/cenclave/src/cenclave/core/sgx_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class SgxDockerConfig(BaseModel):
subject: str
subject_alternative_name: str
expiration_date: int
client_certificate: Optional[Path]
client_certificate: Optional[str]
app_dir: Path
application: str
healthcheck: str
Expand Down Expand Up @@ -47,7 +47,7 @@ def cmd(self) -> List[str]:

if client_certificate := self.client_certificate:
args.append("--client-certificate")
args.append(client_certificate.read_text())
args.append(client_certificate)

return args

Expand Down

0 comments on commit a83d8b9

Please sign in to comment.