Home | History | Annotate | Download | only in ipsec-tools

Lines Matching defs:remoteconf

48 #include "remoteconf.h"
298 static void add_proposal(struct remoteconf *remoteconf,
310 p->rmconf = remoteconf;
312 if (!remoteconf->proposal) {
314 remoteconf->proposal = p;
316 struct isakmpsa *q = remoteconf->proposal;
335 static void set_pre_shared_key(struct remoteconf *remoteconf,
340 remoteconf->idv = strtovchar(identifier);
341 remoteconf->etypes->type = ISAKMP_ETYPE_AGG;
343 remoteconf->idvtype = IDTYPE_KEYID;
345 remoteconf->idvtype = IDTYPE_FQDN;
347 remoteconf->idvtype = IDTYPE_USERFQDN;
353 static void set_certificates(struct remoteconf *remoteconf,
357 remoteconf->myprivfile = user_private_key;
358 remoteconf->mycertfile = user_certificate;
360 remoteconf->idvtype = IDTYPE_ASN1DN;
363 remoteconf->verify_cert = FALSE;
365 remoteconf->cacertfile = ca_certificate;
368 remoteconf->peerscertfile = server_certificate;
369 remoteconf->getcert_method = ISAKMP_GETCERT_LOCALFILE;
375 static void set_xauth_and_more(struct remoteconf *remoteconf,
383 remoteconf->xauth = xauth;
384 remoteconf->mode_cfg = TRUE;
385 remoteconf->script[SCRIPT_PHASE1_UP] = strtovchar(phase1_up);
404 struct remoteconf *remoteconf = NULL;
427 remoteconf = newrmconf();
428 remoteconf->etypes = racoon_calloc(1, sizeof(struct etypes));
429 remoteconf->etypes->type = ISAKMP_ETYPE_IDENT;
430 remoteconf->idvtype = IDTYPE_ADDRESS;
431 remoteconf->ike_frag = TRUE;
432 remoteconf->pcheck_level = PROP_CHECK_CLAIM;
433 remoteconf->certtype = ISAKMP_CERT_X509SIGN;
434 remoteconf->gen_policy = TRUE;
435 remoteconf->nat_traversal = TRUE;
436 remoteconf->dh_group = OAKLEY_ATTR_GRP_DESC_MODP1024;
437 remoteconf->script[SCRIPT_PHASE1_UP] = strtovchar("");
438 remoteconf->script[SCRIPT_PHASE1_DOWN] = strtovchar("");
439 oakley_setdhgroup(remoteconf->dh_group, &remoteconf->dhgrp);
440 remoteconf->remote = dupsaddr(targets[0]);
445 set_pre_shared_key(remoteconf, argv[4], argv[5]);
451 set_certificates(remoteconf, argv[4], argv[5], argv[6], argv[7]);
458 set_pre_shared_key(remoteconf, argv[4], argv[5]);
459 set_xauth_and_more(remoteconf, argv[6], argv[7], argv[8], argv[9]);
462 set_certificates(remoteconf, argv[4], argv[5], argv[6], argv[7]);
463 set_xauth_and_more(remoteconf, argv[8], argv[9], argv[10], argv[11]);
466 set_certificates(remoteconf, NULL, NULL, argv[4], argv[5]);
467 set_xauth_and_more(remoteconf, argv[6], argv[7], argv[8], argv[9]);
489 add_proposal(remoteconf, auth,
491 add_proposal(remoteconf, auth,
493 add_proposal(remoteconf, auth,
495 add_proposal(remoteconf, auth,
497 add_proposal(remoteconf, auth,
499 add_proposal(remoteconf, auth,
501 add_proposal(remoteconf, auth,
503 add_proposal(remoteconf, auth,
507 insrmconf(remoteconf);
510 if (remoteconf->xauth) {
511 isakmp_ph1begin_i(remoteconf, remoteconf->remote, source);