1 /* $OpenBSD: key.h,v 1.8 2005/11/15 22:10:49 cloder Exp $ */ 2 /* 3 * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu) 4 * 5 * Copyright (c) 2000-2001 Angelos D. Keromytis. 6 * 7 * Permission to use, copy, and modify this software with or without fee 8 * is hereby granted, provided that this entire notice is included in 9 * all copies of any software which is or includes a copy or 10 * modification of this software. 11 * You may use this code under the GNU public license if you so wish. Please 12 * contribute changes back to the authors under this freer than GPL license 13 * so that we may further the use of strong encryption without limitations to 14 * all. 15 * 16 * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR 17 * IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY 18 * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE 19 * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR 20 * PURPOSE. 21 */ 22 23 #ifndef _KEY_H_ 24 #define _KEY_H_ 25 26 #define ISAKMP_KEY_NONE 0 27 #define ISAKMP_KEY_PASSPHRASE 1 28 #define ISAKMP_KEY_RSA 2 29 #define ISAKMP_KEY_DSA 3 30 31 #define ISAKMP_KEYTYPE_PUBLIC 0 32 #define ISAKMP_KEYTYPE_PRIVATE 1 33 34 void key_free(int, int, void *); 35 void key_serialize(int, int, void *, u_int8_t **, size_t *); 36 char *key_printable(int, int, u_int8_t *, size_t); 37 void key_from_printable(int, int, char *, u_int8_t **, u_int32_t *); 38 void *key_internalize(int, int, u_int8_t *, size_t); 39 #endif /* _KEY_H_ */ 40