MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / SetDKIMCipher

Method SetDKIMCipher

internal/identity/store.go:354–354  ·  view source on GitHub ↗

SetDKIMCipher enables envelope encryption of DKIM private keys at rest (#144). Optional-setter (matches SetEnforcer/SetPublisher) so NewStore's signature — and the many tests that call NewStore(pool) — stay unchanged. When unset, keys are stored as plaintext DER. cmd/e2a always sets it in production

(c *DKIMCipher)

Source from the content-addressed store, hash-verified

352// are stored as plaintext DER. cmd/e2a always sets it in production, where
353// Signing.HMACSecret is enforced ≥32 bytes.
354func (s *Store) SetDKIMCipher(c *DKIMCipher) { s.dkimCipher = c }
355
356// sealDKIM encrypts a DKIM private key for storage when a cipher is configured,
357// else returns the plaintext DER unchanged. domain is bound as AAD.

Callers 5

TestStoreSealUnsealDKIMFunction · 0.95
mainFunction · 0.95

Implementers 1

Storeinternal/identity/store.go

Calls

no outgoing calls