Sign agent certificate data with the Org CA private key. Args: private_key_pem: Org CA PKCS8 PEM private key. certificate_data: Dict of certificate fields (as passed to AgentCertificate). Returns: Base64url-encoded Ed25519 CA signature.
(
private_key_pem: str,
certificate_data: dict[str, Any],
)
| 176 | |
| 177 | |
| 178 | def sign_agent_certificate( |
| 179 | private_key_pem: str, |
| 180 | certificate_data: dict[str, Any], |
| 181 | ) -> str: |
| 182 | """ |
| 183 | Sign agent certificate data with the Org CA private key. |
| 184 | |
| 185 | Args: |
| 186 | private_key_pem: Org CA PKCS8 PEM private key. |
| 187 | certificate_data: Dict of certificate fields (as passed to AgentCertificate). |
| 188 | |
| 189 | Returns: |
| 190 | Base64url-encoded Ed25519 CA signature. |
| 191 | """ |
| 192 | payload = canonical_json(certificate_data) |
| 193 | return sign_payload(private_key_pem, payload) |
| 194 | |
| 195 | |
| 196 | def sign_token_payload( |
no test coverage detected