summaryrefslogtreecommitdiff
path: root/sys/src/cmd/auth/authcmdlib.h
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2015-08-19 21:06:17 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2015-08-19 21:06:17 +0200
commit02cfcfeab46f36aad95263ed40d19df7bd5eddef (patch)
tree30f67204be8d474b2c761e8944c20d042df1a08b /sys/src/cmd/auth/authcmdlib.h
parentf785d4da07349c7bb250eb00a3f2bed3eb170828 (diff)
libauthsrv: generalize ticket service, not hardcoding ticket format and DES encryption
this is in preparation for replacing DES ticket encryption with something better. but first need to make the code stop making assumptions. the wire encoding of the Ticket might be variable length with TICKETLEN just giving an upper bound. the details will be handled by libauthsrv _asgetticket() and _asgetresp() funciotns. the Authenticator and Passwordreq structures are encrypted with the random ticket key. The encryption schmeme will depend on the Ticket format used, so we pass the Ticket* structure instead of the DES key. introduce Authkey structure that will hold all the required cryptographic keys instead of passing DES key.
Diffstat (limited to 'sys/src/cmd/auth/authcmdlib.h')
-rw-r--r--sys/src/cmd/auth/authcmdlib.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/src/cmd/auth/authcmdlib.h b/sys/src/cmd/auth/authcmdlib.h
index 78a3a7078..b8e31ee13 100644
--- a/sys/src/cmd/auth/authcmdlib.h
+++ b/sys/src/cmd/auth/authcmdlib.h
@@ -39,13 +39,14 @@ extern Fs fs[3];
void checksum(char*, char*);
void error(char*, ...);
void fail(char*);
-char* findkey(char*, char*, char*);
+int findkey(char*, char*, Authkey*);
+char* finddeskey(char*, char*, char*);
char* findsecret(char*, char*, char*);
-int getauthkey(char*);
+int getauthkey(Authkey*);
long getexpiration(char *db, char *u);
-void getpass(char*, char*, int, int);
+void getpass(Authkey*, char*, int, int);
int getsecret(int, char*);
-int keyfmt(Fmt*);
+int deskeyfmt(Fmt*);
void logfail(char*);
int netcheck(void*, long, char*);
char* netdecimal(char*);
@@ -58,7 +59,8 @@ int readfile(char*, char*, int);
void readln(char*, char*, int, int);
long readn(int, void*, long);
char* secureidcheck(char*, char*);
-char* setkey(char*, char*, char*);
+int setkey(char*, char*, Authkey*);
+char* setdeskey(char*, char*, char*);
char* setsecret(char*, char*, char*);
int smartcheck(void*, long, char*);
void succeed(char*);