NetBSD/lib/libskey/skey.h

78 lines
2.0 KiB
C
Raw Normal View History

2000-01-23 05:11:02 +03:00
/* $NetBSD: skey.h,v 1.6 2000/01/23 02:11:02 mycroft Exp $ */
1996-09-19 23:39:36 +04:00
1994-05-21 09:45:58 +04:00
/*
* S/KEY v1.1b (skey.h)
*
* Authors:
* Neil M. Haller <nmh@thumper.bellcore.com>
* Philip R. Karn <karn@chicago.qualcomm.com>
* John S. Walden <jsw@thumper.bellcore.com>
*
* Modifications:
* Scott Chasin <chasin@crimelab.com>
*
* Main client header
*/
#if defined(__TURBOC__) || defined(__STDC__) || defined(LATTICE)
#define ANSIPROTO 1
#endif
#ifndef __ARGS
#ifdef ANSIPROTO
#define __ARGS(x) x
#else
#define __ARGS(x) ()
#endif
#endif
#ifdef SOLARIS
#define setpriority(x,y,z) z
#endif
/* 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 */
};
/* Client-side structure for scanning data stream for challenge */
struct mc
{
char buf[256];
int skip;
int cnt;
};
void f __ARGS ((char *x));
1998-07-27 01:58:46 +04:00
int keycrunch __ARGS ((char *result, const char *seed, const char *passwd));
char *btoe __ARGS ((char *engout, const char *c));
char *put8 __ARGS ((char *out, const char *s));
int etob __ARGS ((char *out, const char *e));
1994-05-21 09:45:58 +04:00
void rip __ARGS ((char *buf));
1998-07-27 01:58:46 +04:00
int skeychallenge __ARGS ((struct skey * mp, const char *name, char *ss, int sslen));
int skeylookup __ARGS ((struct skey * mp, const char *name));
1994-05-21 09:45:58 +04:00
int skeyverify __ARGS ((struct skey * mp, char *response));
void sevenbit __ARGS ((char *s));
void backspace __ARGS ((char *s));
1998-07-27 01:58:46 +04:00
const char *skipspace __ARGS ((const char *s));
char *readpass __ARGS ((char *buf, int n));
char *readskey __ARGS ((char *buf, int n));
1998-07-27 01:58:46 +04:00
int skey_authenticate __ARGS ((const char *));
int skey_passcheck __ARGS ((const char *, char *));
char *skey_keyinfo __ARGS ((const char *));
int skey_haskey __ARGS ((const char *));
int getskeyprompt __ARGS ((struct skey *, char *, char *));
1998-07-27 01:58:46 +04:00
int atob8 __ARGS((char *, const char *));
int btoa8 __ARGS((char *, const char *));
2000-01-23 05:11:02 +03:00
int htoi __ARGS((int));