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