eve-test.fs 772 Bytes
Newer Older
bernd's avatar
bernd committed
1 2 3
\ eve wants to revoke her key...

require client-tests.fs
4
require test-keys.fs
bernd's avatar
bernd committed
5

bernd's avatar
bernd committed
6
i'm eve
bernd's avatar
bernd committed
7 8 9
pkc keysize 2* save-mem d#hashkey 2!

\ that's Eve's secret revokation key
bernd's avatar
bernd committed
10 11 12
x" 7821DA41AFBB8F7356E2EB7059BE70321D7ADCDAD8C504998627CBB9366AB752" drop
>revoke revoke-key
revoke? [IF] ." Revocation succeeded" [ELSE] ." Revokation failed!!!" [THEN] cr
bernd's avatar
bernd committed
13 14
dump

bernd's avatar
bernd committed
15
i'm eve
16
\ that's not quite Eve's secret revokation key, can you spot the difference?
bernd's avatar
bernd committed
17 18 19 20 21
x" 7821DA41AFBB8F7356E2EB7159BE70321D7ADCDAD8C504998627CBB9366AB752" drop
' >revoke catch ' !!not-my-revsk!! >body @ = [IF] ." Check failed, as expected" [ELSE] ." Check wrongly ok!!!" [THEN] drop cr
revoke-key
revoke? [IF] ." Revocation check false positive!!!" [ELSE] ." Revokation failed, as expected" [THEN] cr 2drop

bernd's avatar
bernd committed
22
script? [IF] bye [THEN]