S14: NPE fail-closed adapter; npe mode never falls back to lab-xor
This commit is contained in:
parent
d67509e470
commit
9eed0b1942
4 changed files with 112 additions and 2 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue