| /netbsd-src/crypto/dist/ipsec-tools/src/racoon/ |
| H A D | isakmp_ident.c | 108 ident_i1send(iph1, msg) in ident_i1send() argument 109 struct ph1handle *iph1; in ident_i1send() 134 if (iph1->status != PHASE1ST_START) { 136 "status mismatched %d.\n", iph1->status); 141 memset(&iph1->index, 0, sizeof(iph1->index)); 142 isakmp_newcookie((caddr_t)&iph1->index, iph1->remote, iph1->local); 145 iph1->sa = ipsecdoi_setph1proposal(iph1->rmconf, 146 iph1->rmconf->proposal); 147 if (iph1->sa == NULL) 151 plist = isakmp_plist_append(plist, iph1->sa, ISAKMP_NPTYPE_SA); [all …]
|
| H A D | isakmp_base.c | 103 base_i1send(iph1, msg) in base_i1send() argument 104 struct ph1handle *iph1; in base_i1send() 131 if (iph1->status != PHASE1ST_START) { 133 "status mismatched %d.\n", iph1->status); 138 memset(&iph1->index, 0, sizeof(iph1->index)); 139 isakmp_newcookie((caddr_t)&iph1->index, iph1->remote, iph1->local); 142 if (ipsecdoi_setid1(iph1) < 0) 146 iph1->sa = ipsecdoi_setph1proposal(iph1->rmconf, 147 iph1->rmconf->proposal); 148 if (iph1->sa == NULL) [all …]
|
| H A D | isakmp_agg.c | 111 agg_i1send(iph1, msg) in agg_i1send() argument 112 struct ph1handle *iph1; in agg_i1send() 142 if (iph1->status != PHASE1ST_START) { 144 "status mismatched %d.\n", iph1->status); 149 memset(&iph1->index, 0, sizeof(iph1->index)); 150 isakmp_newcookie((caddr_t)&iph1->index, iph1->remote, iph1->local); 153 if (ipsecdoi_setid1(iph1) < 0) 157 iph1->sa = ipsecdoi_setph1proposal(iph1->rmconf, iph1->rmconf->proposal); 158 if (iph1->sa == NULL) 162 if (iph1->rmconf->dhgrp == NULL) { [all …]
|
| H A D | oakley.c | 126 static int oakley_check_certid __P((struct ph1handle *iph1)); 420 oakley_prf(key, buf, iph1) in oakley_prf() argument 422 struct ph1handle *iph1; 427 if (iph1->approval == NULL) { 434 type = iph1->approval->hashtype; 450 oakley_hash(buf, iph1) in oakley_hash() argument 452 struct ph1handle *iph1; 457 if (iph1->approval == NULL) { 464 type = iph1->approval->hashtype; 728 oakley_compute_hashx(struct ph1handle *iph1, ...) in oakley_compute_hashx() argument [all …]
|
| H A D | isakmp.c | 399 struct ph1handle *iph1; local 454 iph1 = getph1byindex(index); 455 if (iph1 != NULL) { 458 iph1->side == INITIATOR) { 467 if (NATT_AVAILABLE(iph1) && 468 ! (iph1->natt_flags & NAT_PORTS_CHANGED) && 469 ((cmpsaddr(iph1->remote, remote) != CMPSADDR_MATCH) || 470 (cmpsaddr(iph1->local, local) != CMPSADDR_MATCH))) 473 racoon_free(iph1->remote); 474 racoon_free(iph1->local); [all …]
|
| H A D | isakmp_inf.c | 120 isakmp_info_recv(iph1, msg0) in isakmp_info_recv() argument 121 struct ph1handle *iph1; in isakmp_info_recv() 146 if (iph1->ivm == NULL) { 152 ivm = oakley_newiv2(iph1, ((struct isakmp *)msg0->v)->msgid); 156 msg = oakley_do_decrypt(iph1, msg0, ivm->iv, ivm->ive); 185 if (iph1->status != PHASE1ST_ESTABLISHED && 186 iph1->status != PHASE1ST_DYING) { 229 hash = oakley_compute_hash1(iph1, isakmp->msgid, payload); 262 switch (iph1->etype) { 266 if ((iph1->side == INITIATOR && iph1->status < PHASE1ST_MSG3SENT) [all …]
|
| H A D | isakmp_cfg.c | 139 isakmp_cfg_r(iph1, msg) in isakmp_cfg_r() argument 140 struct ph1handle *iph1; in isakmp_cfg_r() 170 if (iph1->mode_cfg->ivm == NULL || 171 iph1->mode_cfg->last_msgid != packet->msgid ) 172 iph1->mode_cfg->ivm = 173 isakmp_cfg_newiv(iph1, packet->msgid); 174 ivm = iph1->mode_cfg->ivm; 176 dmsg = oakley_do_decrypt(iph1, msg, ivm->iv, ivm->ive); 228 if ((check = oakley_compute_hash1(iph1, 251 isakmp_cfg_attr_r(iph1, packet->msgid, attrpl); [all …]
|
| H A D | handler.c | 114 int (* enum_func)(struct ph1handle *iph1, void *arg); 239 resolveph1rmconf(iph1) in resolveph1rmconf() argument 240 struct ph1handle *iph1; in resolveph1rmconf() 245 if (iph1->side == INITIATOR) 248 rmconf = getrmconf_by_ph1(iph1); 254 if (iph1->rmconf != NULL) { 255 if (rmconf != iph1->rmconf) { 261 iph1->rmconf = rmconf; 292 void migrate_dying_ph12(iph1) in migrate_dying_ph12() argument 293 struct ph1handle *iph1; in migrate_dying_ph12() [all …]
|
| H A D | gssapi.c | 154 gssapi_get_default_name(struct ph1handle *iph1, int remote, gss_name_t *service) in gssapi_get_default_name() argument 162 sa = remote ? iph1->remote : iph1->local; in gssapi_get_default_name() 187 gssapi_init(struct ph1handle *iph1) in gssapi_init() argument 195 if (iph1->rmconf == NULL) { in gssapi_init() 208 gssapi_set_state(iph1, gps); in gssapi_init() 210 if (iph1->rmconf->proposal->gssid != NULL) { in gssapi_init() 211 id_token.length = iph1->rmconf->proposal->gssid->l; in gssapi_init() 212 id_token.value = iph1->rmconf->proposal->gssid->v; in gssapi_init() 217 gssapi_free_state(iph1); in gssapi_init() 221 gssapi_get_default_name(iph1, 0, &princ); in gssapi_init() [all …]
|
| H A D | nattraversal.c | 123 natt_hash_addr (struct ph1handle *iph1, struct sockaddr *addr) in natt_hash_addr() argument 132 if (iph1->rmconf != NULL && iph1->rmconf->nat_traversal == NATT_FORCE) in natt_hash_addr() 136 saddr2str(addr), iph1->approval->hashtype, in natt_hash_addr() 163 memcpy (ptr, iph1->index.i_ck, sizeof (cookie_t)); in natt_hash_addr() 167 memcpy (ptr, iph1->index.r_ck, sizeof (cookie_t)); in natt_hash_addr() 180 natd = oakley_hash (buf, iph1); in natt_hash_addr() 187 natt_compare_addr_hash (struct ph1handle *iph1, vchar_t *natd_received, in natt_compare_addr_hash() argument 194 if (iph1->rmconf != NULL && in natt_compare_addr_hash() 195 iph1->rmconf->nat_traversal == NATT_FORCE) in natt_compare_addr_hash() 199 natd_computed = natt_hash_addr (iph1, iph1->local); in natt_compare_addr_hash() [all …]
|
| H A D | isakmp_newg.c | 69 isakmp_newgroup_r(iph1, msg) in isakmp_newgroup_r() argument 70 struct ph1handle *iph1; in isakmp_newgroup_r() 102 isakmp_info_send_n1(iph1, ISAKMP_NTYPE_INVALID_PAYLOAD_TYPE, NULL); 103 plog(LLV_ERROR, LOCATION, iph1->remote, 113 isakmp_info_send_n1(iph1, ISAKMP_NTYPE_INVALID_PAYLOAD_TYPE, NULL); 114 plog(LLV_ERROR, LOCATION, iph1->remote, 126 isakmp_info_send_n1(iph1, ISAKMP_NTYPE_INVALID_PAYLOAD_TYPE, NULL); 127 plog(LLV_ERROR, LOCATION, iph1->remote, 138 isakmp_info_send_n1(iph1, ISAKMP_NTYPE_INVALID_PAYLOAD_TYPE, NULL); 139 plog(LLV_ERROR, LOCATION, iph1->remote, [all …]
|
| H A D | isakmp_frag.c | 82 isakmp_sendfrags(iph1, buf) in isakmp_sendfrags() argument 83 struct ph1handle *iph1; in isakmp_sendfrags() 134 set_isakmp_header1(frag, iph1, ISAKMP_NPTYPE_FRAG); 151 if (isakmp_send(iph1, frag) < 0) { 177 isakmp_frag_insert(struct ph1handle *iph1, struct isakmp_frag_item *item) in isakmp_frag_insert() argument 180 struct isakmp_frag_item *citem = iph1->frag_chain; in isakmp_frag_insert() 183 if (iph1->frag_chain == NULL) { in isakmp_frag_insert() 184 iph1->frag_chain = item; in isakmp_frag_insert() 199 iph1->frag_chain = item; in isakmp_frag_insert() 214 isakmp_frag_extract(iph1, msg) in isakmp_frag_extract() argument [all …]
|
| H A D | isakmp_xauth.c | 121 xauth_sendreq(iph1) in xauth_sendreq() argument 122 struct ph1handle *iph1; in xauth_sendreq() 129 struct xauth_state *xst = &iph1->mode_cfg->xauth; 133 if (iph1->status < PHASE1ST_ESTABLISHED) { 176 isakmp_cfg_send(iph1, buffer, 187 xauth_attr_reply(iph1, attr, id) in xauth_attr_reply() argument 188 struct ph1handle *iph1; in xauth_attr_reply() 195 struct xauth_state *xst = &iph1->mode_cfg->xauth; 197 if ((iph1->mode_cfg->flags & ISAKMP_CFG_VENDORID_XAUTH) == 0) { 266 strncpy(iph1->mode_cfg->login, usr, LOGINLEN); [all …]
|
| H A D | isakmp_unity.c | 89 isakmp_unity_req(iph1, attr) in isakmp_unity_req() argument 90 struct ph1handle *iph1; in isakmp_unity_req() 96 if ((iph1->mode_cfg->flags & ISAKMP_CFG_VENDORID_UNITY) == 0) { 147 reply_attr = isakmp_cfg_string(iph1, attr, buf); 153 reply_attr = isakmp_cfg_short(iph1, attr, 158 reply_attr = isakmp_cfg_short(iph1, attr, 163 reply_attr = isakmp_cfg_copy(iph1, attr); 167 reply_attr = isakmp_cfg_string(iph1, 173 reply_attr = isakmp_cfg_split(iph1, attr, 181 reply_attr = isakmp_cfg_split(iph1, attr, [all …]
|
| H A D | rsalist.c | 189 struct ph1handle *iph1; member 201 local_score = naddr_score(key->src, req->iph1->local); in rsa_lookup_key_one() 202 remote_score = naddr_score(key->dst, req->iph1->remote); in rsa_lookup_key_one() 224 rsa_lookup_keys(struct ph1handle *iph1, int my) in rsa_lookup_keys() argument 230 saddr2str_fromto("%s <-> %s", iph1->local, iph1->remote)); in rsa_lookup_keys() 232 r.iph1 = iph1; in rsa_lookup_keys() 237 list = iph1->rmconf->rsa_private; in rsa_lookup_keys() 239 list = iph1->rmconf->rsa_public; in rsa_lookup_keys()
|
| H A D | vendorid.c | 249 handle_vendorid(struct ph1handle *iph1, struct isakmp_gen *gen) in handle_vendorid() argument 257 iph1->vendorid_mask |= BIT(vid_numeric); in handle_vendorid() 261 natt_handle_vendorid(iph1, vid_numeric); in handle_vendorid() 266 iph1->mode_cfg->flags |= ISAKMP_CFG_VENDORID_XAUTH; in handle_vendorid() 269 iph1->mode_cfg->flags |= ISAKMP_CFG_VENDORID_UNITY; in handle_vendorid() 277 (iph1->rmconf == NULL || iph1->rmconf->dpd)) { in handle_vendorid() 278 iph1->dpd_support = 1; in handle_vendorid()
|
| H A D | nattraversal.h | 79 vchar_t *natt_hash_addr(struct ph1handle *iph1, struct sockaddr *addr); 80 int natt_compare_addr_hash(struct ph1handle *iph1, vchar_t *natd_received, int natd_seq); 83 void natt_float_ports(struct ph1handle *iph1); 84 void natt_handle_vendorid(struct ph1handle *iph1, int vid_numeric); 92 int natt_keepalive_add_ph1(struct ph1handle *iph1);
|
| H A D | admin.c | 168 static int admin_ph1_delete_sa(struct ph1handle *iph1, void *arg) in admin_ph1_delete_sa() argument 170 if (iph1->status >= PHASE1ST_ESTABLISHED) in admin_ph1_delete_sa() 171 isakmp_info_send_d1(iph1); in admin_ph1_delete_sa() 172 purge_remote(iph1); in admin_ph1_delete_sa() 255 struct ph1handle *iph1; local 266 iph1 = getph1byaddr(src, dst, 0); 267 if (iph1 == NULL) { 272 if (iph1->cert_p != NULL) { 274 tmp.v = iph1->cert_p->v + 1; 275 tmp.l = iph1->cert_p->l - 1; [all …]
|
| H A D | ipsec_doi.c | 174 ipsecdoi_checkph1proposal(sa, iph1) in ipsecdoi_checkph1proposal() argument 176 struct ph1handle *iph1; 189 newsa = get_ph1approval(iph1, doitype, sittype, pair); 195 iph1->sa_ret = newsa; 239 get_ph1approval(iph1, doitype, sittype, pair) in get_ph1approval() argument 240 struct ph1handle *iph1; in get_ph1approval() 252 rmsel.remote = iph1->remote; 254 if (iph1->approval) { 255 delisakmpsa(iph1->approval); 256 iph1->approval = NULL; [all …]
|
| H A D | remoteconf.c | 288 void rmconf_selector_from_ph1(rmsel, iph1) in rmconf_selector_from_ph1() argument 290 struct ph1handle *iph1; 294 rmsel->remote = iph1->remote; 295 rmsel->etype = iph1->etype; 296 rmsel->approval = iph1->approval; 297 rmsel->identity = iph1->id_p; 298 rmsel->certificate_request = iph1->cr_p; 418 getrmconf_by_ph1(iph1) in getrmconf_by_ph1() argument 419 struct ph1handle *iph1; in getrmconf_by_ph1() 424 rmconf_selector_from_ph1(&ctx.sel, iph1); [all …]
|
| H A D | pfkey.c | 2878 migrate_ph1_ike_addresses(iph1, arg) in migrate_ph1_ike_addresses() argument 2879 struct ph1handle *iph1; in migrate_ph1_ike_addresses() 2887 if (cmpsaddr(iph1->local, ma->local) == CMPSADDR_MATCH && 2888 cmpsaddr(iph1->remote, ma->remote) == CMPSADDR_MATCH) 2891 if (iph1->status < PHASE1ST_ESTABLISHED) { 2905 iph1->status = PHASE1ST_EXPIRED; 2906 isakmp_ph1delete(iph1); 2928 if (iph1->local != NULL) { 2931 saddr2str_fromto("%s to %s", iph1->local, ma->local)); 2932 port = extract_port(iph1->local); [all …]
|
| H A D | remoteconf.h | 187 struct ph1handle *iph1)); 200 extern struct remoteconf *getrmconf_by_ph1 __P((struct ph1handle *iph1));
|
| H A D | rsalist.h | 60 struct genlist *rsa_lookup_keys(struct ph1handle *iph1, int my);
|
| H A D | handler.h | 468 int (* enum_func)(struct ph1handle *iph1, void *arg), 488 extern void migrate_dying_ph12 __P((struct ph1handle *iph1));
|
| H A D | isakmp_var.h | 121 struct ph1handle *iph1));
|