1 /* Security Policy Data Base (such as it is)
2 * Copyright (C) 1998, 1999 D. Hugh Redelmeier.
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * RCSID $Id: spdb.h,v 1.11 2000/09/15 09:09:28 dhr Exp $
17 /* database of SA properties */
19 /* Attribute type and value pair.
20 * Note: only "basic" values are represented so far.
23 u_int16_t type; /* ISAKMP_ATTR_AF_TV is implied; 0 for end */
29 u_int8_t transid; /* Transform-Id */
30 struct db_attr *attrs; /* array */
31 int attr_cnt; /* number of elements */
36 u_int8_t protoid; /* Protocol-Id */
37 struct db_trans *trans; /* array (disjunction) */
38 int trans_cnt; /* number of elements */
39 /* SPI size and value isn't part of DB */
42 /* conjunction of proposals */
44 struct db_prop *props; /* array */
45 int prop_cnt; /* number of elements */
48 /* security association */
50 struct db_prop_conj *prop_conjs; /* array */
51 int prop_conj_cnt; /* number of elements */
53 * DOI: ISAKMP_DOI_IPSEC
54 * Situation: SIT_IDENTITY_ONLY
58 /* The oakley sadb is subscripted by a bitset with members
59 * from POLICY_PSK and POLICY_RSASIG.
61 extern struct db_sa oakley_sadb[1 << 2];
63 /* The oakley sadb for aggressive mode.
65 extern struct db_sa otpsk768des3sha_sadb_am;
66 extern struct db_sa otpsk1024des3sha_sadb_am;
67 extern struct db_sa otpsk1536des3sha_sadb_am;
68 extern struct db_sa otpsk768des3md5_sadb_am;
69 extern struct db_sa otpsk1024des3md5_sadb_am;
70 extern struct db_sa otpsk1536des3md5_sadb_am;
71 extern struct db_sa otpsk768dessha_sadb_am;
72 extern struct db_sa otpsk1024dessha_sadb_am;
73 extern struct db_sa otpsk1536dessha_sadb_am;
74 extern struct db_sa otpsk768desmd5_sadb_am;
75 extern struct db_sa otpsk1024desmd5_sadb_am;
76 extern struct db_sa otpsk1536desmd5_sadb_am;
79 /* The ipsec sadb is subscripted by a bitset with members
80 * from POLICY_ENCRYPT, POLICY_AUTHENTICATE, POLICY_COMPRESS
82 extern struct db_sa ipsec_sadb[1 << 3];
91 extern complaint_t accept_oakley_auth_method(
92 struct state *st, /* current state object */
93 u_int32_t amethod, /* room for larger values */
94 bool credcheck); /* whether we can check credentials now */
96 extern int init_st_oakley(struct state *st, lset_t policy);
98 extern notification_t parse_isakmp_sa_body(
99 pb_stream *sa_pbs, /* body of input SA Payload */
100 const struct isakmp_sa *sa, /* header of input SA Payload */
101 pb_stream *r_sa_pbs, /* if non-NULL, where to emit winning SA */
102 bool selection, /* if this SA is a selection, only one tranform can appear */
103 struct state *st); /* current state object */
105 extern notification_t parse_ipsec_sa_body(
106 pb_stream *sa_pbs, /* body of input SA Payload */
107 const struct isakmp_sa *sa, /* header of input SA Payload */
108 pb_stream *r_sa_pbs, /* if non-NULL, where to emit winning SA */
109 bool selection, /* if this SA is a selection, only one tranform can appear */
110 struct state *st); /* current state object */