S14: NPE fail-closed adapter; npe mode never falls back to lab-xor
Some checks are pending
ci / python (push) Waiting to run
ci / go (push) Waiting to run

This commit is contained in:
George Lambert 2026-09-15 22:22:56 -04:00
parent d67509e470
commit 9eed0b1942
4 changed files with 112 additions and 2 deletions

View file

@ -33,6 +33,15 @@ class SignedConfigTests(unittest.TestCase):
load_signed(p, pub)
class NpeAdapterTests(unittest.TestCase):
def test_npe_mode_fail_closed(self):
from secure_messaging.npe_adapter import NpeRequired
from secure_messaging.envelope import seal
with self.assertRaises(NpeRequired):
seal(to="npe.inbox.x", sender="alice", body={"a": 1}, mode="npe")
class EnvelopeTests(unittest.TestCase):
def test_lab_xor_roundtrip_lookup(self):
env = seal(