pub enum SigningKeyMaterial {
Off,
Hmac {
kid: String,
key: Zeroizing<Vec<u8>>,
},
Ed25519 {
kid: String,
signing_key: SigningKey,
},
}Expand description
Runtime signing key material.
Note: Debug is implemented manually so that key bytes never leak into
log output. We surface the variant + kid only.
Variants§
Off
Signing disabled — passthrough, no envelope wrapping.
Hmac
HMAC-SHA256 with a shared symmetric key.
Fields
§
kid: StringSigner kid embedded in the SignedEventEnvelopeV1.
Ed25519
Ed25519 asymmetric signing.
Fields
§
kid: StringSigner kid embedded in the SignedEventEnvelopeV1.
§
signing_key: SigningKeyEd25519 signing key (private). Verifier holds the matching
VerifyingKey.
Implementations§
Source§impl SigningKeyMaterial
impl SigningKeyMaterial
Sourcepub fn is_off(&self) -> bool
pub fn is_off(&self) -> bool
True iff this is the SigningKeyMaterial::Off variant.
Sourcepub fn kid(&self) -> Option<&str>
pub fn kid(&self) -> Option<&str>
Signer kid for the active variant; None for SigningKeyMaterial::Off.
Sourcepub fn from_env() -> Result<Self, SignOutboundError>
pub fn from_env() -> Result<Self, SignOutboundError>
Load signing material from env vars (see module docs).
- Unset /
"off"→SigningKeyMaterial::Off. "hmac-sha256"→ requires kid + HMAC key, rejects ed25519 key."ed25519"→ requires kid + ed25519 seed, rejects HMAC key.
Trait Implementations§
Source§impl Debug for SigningKeyMaterial
impl Debug for SigningKeyMaterial
Auto Trait Implementations§
impl Freeze for SigningKeyMaterial
impl RefUnwindSafe for SigningKeyMaterial
impl Send for SigningKeyMaterial
impl Sync for SigningKeyMaterial
impl Unpin for SigningKeyMaterial
impl UnsafeUnpin for SigningKeyMaterial
impl UnwindSafe for SigningKeyMaterial
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more