Skip to main content

handle_service_ensure_key

Function handle_service_ensure_key 

Source
pub fn handle_service_ensure_key(
    config: Option<&HyprConfig>,
    name: &str,
) -> Result<()>
Expand description

Handle service ensure-key — materialize a service’s signing key and its public sidecars without starting any services.

Runs the same loader the service itself uses (resolve_service_signing_key, so policy resolves to the flat node/CA key), then guarantees the public sidecars exist next to the seed:

  • signing-key.pub — 32-byte Ed25519 verifying key (mode 0644)
  • service-pubkey.hybrid — 1984-byte hybrid bootstrap entry (mode 0644)

Idempotent: an existing key is loaded, never rotated, and up-to-date sidecars are left untouched. Prints the base64 public key and the sidecar paths for provisioning units that wire them into a credential mint.