Blob


1 enum{ MAXFILESIZE = 10*1024*1024 };
3 enum{// PW status bits
4 Enabled = (1<<0),
5 STA = (1<<1), // extra SecurID step
6 };
8 typedef struct PW {
9 char *id; // user id
10 ulong expire; // expiration time (epoch seconds)
11 ushort status; // Enabled, STA, ...
12 ushort failed; // number of failed login attempts
13 char *other; // other information, e.g. sponsor
14 mpint *Hi; // H(passphrase)^-1 mod p
15 } PW;
17 PW *getPW(char *, int);
18 int putPW(PW *);
19 void freePW(PW *);
20 char* getpassm(const char*);
22 // *client: SConn, client name, passphrase
23 // *server: SConn, (partial) 1st msg, PW entry
24 // *setpass: Username, hashed passphrase, PW entry
25 int PAKclient(SConn *, char *, char *, char **);
26 int PAKserver(SConn *, char *, char *, PW **);
27 char *PAK_Hi(char *, char *, mpint *, mpint *);
29 #define LOG "secstore"
30 #define SECSTORE_DIR "/adm/secstore"