Request a TLS key from the service with optional parameters.
(
self,
subject: str | None = None,
alt_names: List[str] | None = None,
usage_ra_tls: bool = False,
usage_server_auth: bool = True,
usage_client_auth: bool = False,
)
| 462 | return None |
| 463 | |
| 464 | async def get_tls_key( |
| 465 | self, |
| 466 | subject: str | None = None, |
| 467 | alt_names: List[str] | None = None, |
| 468 | usage_ra_tls: bool = False, |
| 469 | usage_server_auth: bool = True, |
| 470 | usage_client_auth: bool = False, |
| 471 | ) -> GetTlsKeyResponse: |
| 472 | """Request a TLS key from the service with optional parameters.""" |
| 473 | data: Dict[str, Any] = { |
| 474 | "subject": subject or "", |
| 475 | "usage_ra_tls": usage_ra_tls, |
| 476 | "usage_server_auth": usage_server_auth, |
| 477 | "usage_client_auth": usage_client_auth, |
| 478 | } |
| 479 | if alt_names: |
| 480 | data["alt_names"] = list(alt_names) |
| 481 | |
| 482 | result = await self._send_rpc_request("GetTlsKey", data) |
| 483 | return GetTlsKeyResponse(**result) |
| 484 | |
| 485 | async def sign(self, algorithm: str, data: str | bytes) -> SignResponse: |
| 486 | """Signs data using a derived key.""" |