(cfg: &KmsConfig)
| 361 | } |
| 362 | |
| 363 | pub(crate) async fn bootstrap_keys(cfg: &KmsConfig) -> Result<()> { |
| 364 | ensure_self_kms_allowed(cfg) |
| 365 | .await |
| 366 | .context("KMS is not allowed to auto-bootstrap")?; |
| 367 | let keys = Keys::generate(&cfg.onboard.auto_bootstrap_domain) |
| 368 | .await |
| 369 | .context("Failed to generate keys")?; |
| 370 | keys.store(cfg)?; |
| 371 | Ok(()) |
| 372 | } |
| 373 | |
| 374 | async fn attest_keys(p256_pubkey: &[u8], k256_pubkey: &[u8]) -> Result<Vec<u8>> { |
| 375 | let p256_hex = hex::encode(p256_pubkey); |
no test coverage detected