1994-09-29 19:27:35 +00:00
|
|
|
#ifndef _SKEY_H_
|
|
|
|
#define _SKEY_H_
|
|
|
|
|
|
|
|
#include <sys/cdefs.h>
|
|
|
|
|
|
|
|
/* Server-side data structure for reading keys file during login */
|
|
|
|
struct skey {
|
|
|
|
FILE *keyfile;
|
|
|
|
char buf[256];
|
|
|
|
char *logname;
|
|
|
|
int n;
|
|
|
|
char *seed;
|
|
|
|
char *val;
|
|
|
|
long recstart; /*needed so reread of buffer is efficient*/
|
|
|
|
};
|
|
|
|
|
1996-10-17 15:22:46 +00:00
|
|
|
#ifdef _SKEY_INTERNAL
|
1994-09-29 19:27:35 +00:00
|
|
|
/* Client-side structure for scanning data stream for challenge */
|
|
|
|
struct mc {
|
|
|
|
char buf[256];
|
|
|
|
int skip;
|
|
|
|
int cnt;
|
|
|
|
};
|
|
|
|
|
1996-10-17 15:22:46 +00:00
|
|
|
#define atob8 _sk_atob8
|
|
|
|
#define btoa8 _sk_btoa8
|
|
|
|
#define btoe _sk_btoe
|
|
|
|
#define etob _sk_etob
|
|
|
|
#define f _sk_f
|
|
|
|
#define htoi _sk_htoi
|
|
|
|
#define keycrunch _sk_keycrunch
|
|
|
|
#define put8 _sk_put8
|
|
|
|
#define readpass _sk_readpass
|
|
|
|
#define rip _sk_rip
|
|
|
|
#define sevenbit _sk_sevenbit
|
|
|
|
|
1994-09-29 19:27:35 +00:00
|
|
|
void f __P((char *x));
|
1998-02-27 22:36:51 +00:00
|
|
|
int keycrunch __P((char *result,const char *seed,const char *passwd));
|
1994-09-29 19:27:35 +00:00
|
|
|
char *btoe __P((char *engout,char *c));
|
|
|
|
char *put8 __P((char *out,char *s));
|
1996-07-12 18:57:58 +00:00
|
|
|
int atob8 __P((char *out, char *in));
|
|
|
|
int btoa8 __P((char *out, char *in));
|
|
|
|
int htoi __P((char c));
|
1994-09-29 19:27:35 +00:00
|
|
|
int etob __P((char *out,char *e));
|
1996-07-12 18:57:58 +00:00
|
|
|
void sevenbit __P((char *s));
|
1996-10-17 15:22:46 +00:00
|
|
|
char *readpass __P((char *buf, int n));
|
1994-09-29 19:27:35 +00:00
|
|
|
void rip __P((char *buf));
|
1996-10-17 15:22:46 +00:00
|
|
|
#endif /* _SKEY_INTERNAL */
|
1994-10-19 00:03:45 +00:00
|
|
|
|
|
|
|
/* Simplified application programming interface. */
|
|
|
|
#include <pwd.h>
|
1997-03-08 06:22:51 +00:00
|
|
|
int skeylookup __P((struct skey *mp, const char *name));
|
|
|
|
int skeyverify __P((struct skey *mp, char *response));
|
|
|
|
int skeychallenge __P((struct skey *mp, const char *name, char *challenge));
|
|
|
|
int skeyinfo __P((struct skey *mp, const char* name, char *ss));
|
|
|
|
int skeyaccess __P((char *user, const char *port, const char *host, const char *addr));
|
|
|
|
char *skey_getpass __P((const char *prompt, struct passwd * pwd, int pwok));
|
1998-10-26 11:54:36 +00:00
|
|
|
const char *skey_crypt __P((char *pp, char *salt, struct passwd *pwd, int pwok));
|
1994-09-29 19:27:35 +00:00
|
|
|
|
|
|
|
#endif /* _SKEY_H_ */
|