diff options
| author | rsc <devnull@localhost> | 2004-12-27 19:36:51 +0000 |
|---|---|---|
| committer | rsc <devnull@localhost> | 2004-12-27 19:36:51 +0000 |
| commit | a812ae4b4392cade3321da1a146a231ff88db3b7 (patch) | |
| tree | 5ddcda3efed1d7cf7791faa5f93dc7b33a56a944 /src/cmd/secstore/secstore.h | |
| parent | 73bfbacb2409b10f45fd080891a95de29cafe4a0 (diff) | |
| download | plan9port-a812ae4b4392cade3321da1a146a231ff88db3b7.tar.gz plan9port-a812ae4b4392cade3321da1a146a231ff88db3b7.zip | |
secstore from ehg
Diffstat (limited to 'src/cmd/secstore/secstore.h')
| -rw-r--r-- | src/cmd/secstore/secstore.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/cmd/secstore/secstore.h b/src/cmd/secstore/secstore.h new file mode 100644 index 00000000..1d6d6d34 --- /dev/null +++ b/src/cmd/secstore/secstore.h @@ -0,0 +1,30 @@ +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 *); +char* getpassm(const char*); + +// *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" +#define SECSTORE_DIR "/adm/secstore" |
