| ---
tsecstore.h (830B)
---
1 enum{ MAXFILESIZE = 10*1024*1024 };
2
3 enum{/* PW status bits */
4 Enabled = (1<<0),
5 STA = (1<<1) /* extra SecurID step */
6 };
7
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;
16
17 PW *getPW(char *, int);
18 int putPW(PW *);
19 void freePW(PW *);
20
21 /* *client: SConn, client name, passphrase */
22 /* *server: SConn, (partial) 1st msg, PW entry */
23 /* *setpass: Username, hashed passphrase, PW entry */
24 int PAKclient(SConn *, char *, char *, char **);
25 int PAKserver(SConn *, char *, char *, PW **);
26 char *PAK_Hi(char *, char *, mpint *, mpint *);
27
28 #define LOG "secstore"
29
30 extern char *SECSTORE_DIR; |