diff options
| author | rsc <devnull@localhost> | 2005-02-13 05:59:29 +0000 |
|---|---|---|
| committer | rsc <devnull@localhost> | 2005-02-13 05:59:29 +0000 |
| commit | 6e527fbc4d8f404a7eec934e5c9efaaaa92ffdff (patch) | |
| tree | 4d9ed63c88e5a8dd8a4d5bd3582e7d5e6a24065f /src/cmd/auth/secstore/secstore.h | |
| parent | 0f8ec41b0ae522b73085fa1662461e6351ba7e54 (diff) | |
| download | plan9port-6e527fbc4d8f404a7eec934e5c9efaaaa92ffdff.tar.gz plan9port-6e527fbc4d8f404a7eec934e5c9efaaaa92ffdff.zip | |
new auth
Diffstat (limited to 'src/cmd/auth/secstore/secstore.h')
| -rw-r--r-- | src/cmd/auth/secstore/secstore.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/cmd/auth/secstore/secstore.h b/src/cmd/auth/secstore/secstore.h new file mode 100644 index 00000000..dbd2ec9c --- /dev/null +++ b/src/cmd/auth/secstore/secstore.h @@ -0,0 +1,31 @@ +enum{ MAXFILESIZE = 10*1024*1024 }; + +enum{// PW status bits + Enabled = (1<<0), + STA = (1<<1), // extra SecurID step +}; + +typedef struct PW { + char *id; // user id + ulong expire; // expiration time (epoch seconds) + ushort status; // Enabled, STA, ... + ushort failed; // number of failed login attempts + char *other; // other information, e.g. sponsor + mpint *Hi; // H(passphrase)^-1 mod p +} PW; + +PW *getPW(char *, int); +int putPW(PW *); +void freePW(PW *); + +// *client: SConn, client name, passphrase +// *server: SConn, (partial) 1st msg, PW entry +// *setpass: Username, hashed passphrase, PW entry +int PAKclient(SConn *, char *, char *, char **); +int PAKserver(SConn *, char *, char *, PW **); +char *PAK_Hi(char *, char *, mpint *, mpint *); + +#define LOG "secstore" + +extern char *SECSTORE_DIR; + |
