diff options
| author | Charles.Forsyth <devnull@localhost> | 2006-12-22 20:52:35 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2006-12-22 20:52:35 +0000 |
| commit | 46439007cf417cbd9ac8049bb4122c890097a0fa (patch) | |
| tree | 6fdb25e5f3a2b6d5657eb23b35774b631d4d97e4 /module/security.m | |
| parent | 37da2899f40661e3e9631e497da8dc59b971cbd0 (diff) | |
20060303-partial
Diffstat (limited to 'module/security.m')
| -rw-r--r-- | module/security.m | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/module/security.m b/module/security.m new file mode 100644 index 00000000..59a6c361 --- /dev/null +++ b/module/security.m @@ -0,0 +1,59 @@ +# +# security routines implemented in limbo +# + + +Virgil: module +{ + PATH: con "/dis/lib/virgil.dis"; + + virgil: fn(args: list of string): string; +}; + +Random: module +{ + PATH: con "/dis/lib/random.dis"; + + ReallyRandom: con 0; + NotQuiteRandom: con 1; + + randomint: fn(which: int): int; + randombuf: fn(which, n: int): array of byte; +}; + +# +# secure socket layer emulator +# +SSL: module +{ + PATH: con "/dis/lib/ssl.dis"; + + connect: fn(fd: ref Sys->FD): (string, ref Sys->Connection); + secret: fn(c: ref Sys->Connection, secretin, secretout: array of byte): string; +}; + + +# +# Encrypted Key Exchange protocol +# +Login: module +{ + PATH: con "/dis/lib/login.dis"; + + login: fn(id, password, dest: string): (string, ref Keyring->Authinfo); +}; + +# +# Station To Station protocol +# +Auth: module +{ + PATH: con "/dis/lib/auth.dis"; + + init: fn(): string; + server: fn(algs: list of string, ai: ref Keyring->Authinfo, fd: ref Sys->FD, setid: int): (ref Sys->FD, string); + client: fn(alg: string, ai: ref Keyring->Authinfo, fd: ref Sys->FD): (ref Sys->FD, string); + auth: fn(ai: ref Keyring->Authinfo, keyspec: string, alg: string, dfd: ref Sys->FD): (ref Sys->FD, ref Keyring->Authinfo, string); + keyfile: fn(keyspec: string): string; + key: fn(keyspec: string): ref Keyring->Authinfo; +}; |
