mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-04 20:24:12 +00:00
More reliably corrupt the signature
This commit is contained in:
parent
4117beba6a
commit
a223f6bb60
@ -1069,8 +1069,11 @@ class Signatures(SyncTestCase):
|
|||||||
# delivered to the subscriber.
|
# delivered to the subscriber.
|
||||||
ann = {"service-name": "good-stuff", "payload": "bad stuff"}
|
ann = {"service-name": "good-stuff", "payload": "bad stuff"}
|
||||||
(msg, sig, key) = sign_to_foolscap(ann, private_key)
|
(msg, sig, key) = sign_to_foolscap(ann, private_key)
|
||||||
# Invalidate the signature a little
|
# Drop a base32 word from the middle of the key to invalidate the
|
||||||
sig = sig.replace(b"2", b"3")
|
# signature.
|
||||||
|
sig_l = list(sig)
|
||||||
|
sig_l[20:22] = []
|
||||||
|
sig = b"".join(sig_l)
|
||||||
ann_t = (msg, sig, key)
|
ann_t = (msg, sig, key)
|
||||||
ic.got_announcements([ann_t])
|
ic.got_announcements([ann_t])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user