diff options
| author | forsyth <forsyth@vitanuova.com> | 2010-08-02 14:49:50 +0100 |
|---|---|---|
| committer | forsyth <forsyth@vitanuova.com> | 2010-08-02 14:49:50 +0100 |
| commit | 66f5808b81b1df84bc57c4f7b9d487201bc162fb (patch) | |
| tree | fe09448075dcf50ecca78a673e16ad84a666d3da /appl/cmd/auth/countersigner.b | |
| parent | 7781741266783e4df3b35d42a55e8e504838898b (diff) | |
20100802-1449
Diffstat (limited to 'appl/cmd/auth/countersigner.b')
| -rw-r--r-- | appl/cmd/auth/countersigner.b | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/appl/cmd/auth/countersigner.b b/appl/cmd/auth/countersigner.b index a444f807..57e4388d 100644 --- a/appl/cmd/auth/countersigner.b +++ b/appl/cmd/auth/countersigner.b @@ -9,6 +9,9 @@ include "draw.m"; include "keyring.m"; kr: Keyring; +include "msgio.m"; + msgio: Msgio; + include "security.m"; Countersigner: module @@ -22,6 +25,8 @@ init(nil: ref Draw->Context, nil: list of string) { sys = load Sys Sys->PATH; kr = load Keyring Keyring->PATH; + msgio = load Msgio Msgio->PATH; + msgio->init(); stdin = sys->fildes(0); stdout = sys->fildes(1); @@ -34,7 +39,7 @@ init(nil: ref Draw->Context, nil: list of string) } # get boxid - buf := kr->getmsg(stdin); + buf := msgio->getmsg(stdin); if(buf == nil){ sys->fprint(stderr, "countersigner: client hung up\n"); raise "fail:hungup"; @@ -48,12 +53,12 @@ init(nil: ref Draw->Context, nil: list of string) sys->fprint(stderr, "countersigner: can't open %s: %r\n", file); raise "fail:bad boxid"; } - blind := kr->getmsg(fd); + blind := msgio->getmsg(fd); if(blind == nil){ sys->fprint(stderr, "countersigner: can't read %s\n", file); raise "fail:no blind"; } # answer client - kr->sendmsg(stdout, blind, len blind); + msgio->sendmsg(stdout, blind, len blind); } |
