#[non_exhaustive]pub struct ImportKeyParams {
pub algorithm: KeyAlgorithm,
pub expect_key: Option<String>,
pub label: String,
pub policy: Option<KeyPolicyParams>,
}Expand description
Params for import_key action.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.algorithm: KeyAlgorithmWhat the bytes are, as a key algorithm name.
Required, because raw material says nothing about itself: a symmetric
algorithm reads the bytes as the key itself, every other one reads them
as PKCS#8 DER. unwrap_key can leave this out for a keypair because the
artifact it reads carries a description; an artifact of plain bytes
carries nothing.
expect_key: Option<String>The expected identity of the imported key: "sha256:<hex>" over its
SPKI DER for a keypair, "cmac-aes:<hex>" for a symmetric key.
Optional, since a ceremony may be lifting material whose identity it learns only afterwards. Where it is known it is the only evidence available about material this ceremony did not itself produce.
label: StringLabel for the imported key.
policy: Option<KeyPolicyParams>What the imported key is permitted to do, and whether it may leave the backend again.
Nothing travels with raw key material saying what it may do, so the
ceremony declares it, exactly as at unwrap_key.
Trait Implementations§
Source§impl Clone for ImportKeyParams
impl Clone for ImportKeyParams
Source§impl Debug for ImportKeyParams
impl Debug for ImportKeyParams
Source§impl<'de> Deserialize<'de> for ImportKeyParams
impl<'de> Deserialize<'de> for ImportKeyParams
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for ImportKeyParams
impl JsonSchema for ImportKeyParams
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more