Skip to main content

resolve_backend_key

Function resolve_backend_key 

Source
pub fn resolve_backend_key<'a, S: BuildHasher>(
    artifacts: &'a HashMap<ArtifactId, ArtifactValue, S>,
    artifact_id: &ArtifactId,
) -> Result<(&'a str, &'a KeyId, KeyAlgorithm, Option<&'a Vec<u8>>), ExecutionError>
Expand description

Resolve an artifact to a backend-managed key reference.

Returns (backend_name, key_id, algorithm, public_key) tuple for backend operations. This is used when actions need to perform operations on backend-managed keys.

§Errors

Returns an error if:

  • The artifact doesn’t exist
  • The artifact is not a BackendKey variant