diff options
author | Hans Insulander <hin@cvs.openbsd.org> | 2001-05-25 10:23:08 +0000 |
---|---|---|
committer | Hans Insulander <hin@cvs.openbsd.org> | 2001-05-25 10:23:08 +0000 |
commit | dd9e896da481d498f32b58d839efdf947b25a2ff (patch) | |
tree | 91c58e8382007a28f1b09df818943173a0840fe8 /lib/libtelnet/encrypt.h | |
parent | 1346fe2b7456f0c8948b24720f7afa4650704cd8 (diff) |
KerberosV stuff taken from Heimdal.
Diffstat (limited to 'lib/libtelnet/encrypt.h')
-rw-r--r-- | lib/libtelnet/encrypt.h | 55 |
1 files changed, 28 insertions, 27 deletions
diff --git a/lib/libtelnet/encrypt.h b/lib/libtelnet/encrypt.h index 7b26aabd0fe..d079644b111 100644 --- a/lib/libtelnet/encrypt.h +++ b/lib/libtelnet/encrypt.h @@ -30,9 +30,9 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * from: @(#)encrypt.h 8.1 (Berkeley) 6/4/93 - * $OpenBSD: encrypt.h,v 1.3 1998/03/12 04:48:49 art Exp $ - * $NetBSD: encrypt.h,v 1.4 1996/02/24 01:15:20 jtk Exp $ + * from: @(#)encrypt.h 8.1 (Berkeley) 6/4/93 + * $OpenBSD: encrypt.h,v 1.4 2001/05/25 10:23:06 hin Exp $ + * $NetBSD: encrypt.h,v 1.4 1996/02/24 01:15:20 jtk Exp $ */ /* @@ -44,7 +44,6 @@ * code was determined to fall under General License GTDA under ECCN 5D96G, * and hence exportable. The cryptographic interfaces were re-added by Eric * Young, and then KTH proceeded to maintain the code in the free world. - * */ /* @@ -67,38 +66,40 @@ * or implied warranty. */ -#ifndef __ENCRYPT__ -#define __ENCRYPT__ +/* $KTH: encrypt.h,v 1.4 1997/01/24 23:10:56 assar Exp $ */ -#define DIR_DECRYPT 1 -#define DIR_ENCRYPT 2 +#ifndef __ENCRYPT__ +#define __ENCRYPT__ -#define VALIDKEY(key) ( key[0] | key[1] | key[2] | key[3] | \ - key[4] | key[5] | key[6] | key[7]) +#define DIR_DECRYPT 1 +#define DIR_ENCRYPT 2 -#define SAMEKEY(k1, k2) (!memcmp(k1, k2, sizeof(des_cblock))) +#define VALIDKEY(key) ( key[0] | key[1] | key[2] | key[3] | \ + key[4] | key[5] | key[6] | key[7]) -typedef struct { - short type; - int length; - unsigned char *data; +#define SAMEKEY(k1, k2) (!memcmp(k1, k2, sizeof(des_cblock))) + +typedef struct { + short type; + int length; + unsigned char *data; } Session_Key; typedef struct { - char *name; - int type; - void (*output) (unsigned char *, int); - int (*input) (int); - void (*init) (int); - int (*start) (int, int); - int (*is) (unsigned char *, int); - int (*reply) (unsigned char *, int); - void (*session) (Session_Key *, int); - int (*keyid) (int, unsigned char *, int *); - void (*printsub) (unsigned char *, int, unsigned char *, int); + char *name; + int type; + void (*output) (unsigned char *, int); + int (*input) (int); + void (*init) (int); + int (*start) (int, int); + int (*is) (unsigned char *, int); + int (*reply) (unsigned char *, int); + void (*session) (Session_Key *, int); + int (*keyid) (int, unsigned char *, int *); + void (*printsub) (unsigned char *, int, unsigned char *, int); } Encryptions; -#define SK_DES 1 /* Matched Kerberos v5 KEYTYPE_DES */ +#define SK_DES 1 /* Matched Kerberos v5 KEYTYPE_DES */ #include "enc-proto.h" |