S14: NPE fail-closed adapter; npe mode never falls back to lab-xor

This commit is contained in:
Scott "R00tPiG Security" Lindsey 2026-09-15 22:22:56 -04:00
commit 0e77d60917

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(