Lines Matching defs:remoteconf
48 #include "remoteconf.h"
299 static void add_proposal(struct remoteconf *remoteconf,
311 p->rmconf = remoteconf;
313 if (!remoteconf->proposal) {
315 remoteconf->proposal = p;
317 struct isakmpsa *q = remoteconf->proposal;
336 static void set_pre_shared_key(struct remoteconf *remoteconf,
341 remoteconf->idv = strtovchar(identifier);
342 remoteconf->etypes->type = ISAKMP_ETYPE_AGG;
344 remoteconf->idvtype = IDTYPE_KEYID;
346 remoteconf->idvtype = IDTYPE_FQDN;
348 remoteconf->idvtype = IDTYPE_USERFQDN;
354 static void set_certificates(struct remoteconf *remoteconf,
358 remoteconf->myprivfile = user_private_key;
359 remoteconf->mycertfile = user_certificate;
361 remoteconf->idvtype = IDTYPE_ASN1DN;
364 remoteconf->verify_cert = FALSE;
366 remoteconf->cacertfile = ca_certificate;
369 remoteconf->peerscertfile = server_certificate;
370 remoteconf->getcert_method = ISAKMP_GETCERT_LOCALFILE;
376 static void set_xauth_and_more(struct remoteconf *remoteconf,
384 remoteconf->xauth = xauth;
385 remoteconf->mode_cfg = TRUE;
386 remoteconf->script[SCRIPT_PHASE1_UP] = strtovchar(phase1_up);
405 struct remoteconf *remoteconf = NULL;
428 remoteconf = newrmconf();
429 remoteconf->etypes = racoon_calloc(1, sizeof(struct etypes));
430 remoteconf->etypes->type = ISAKMP_ETYPE_IDENT;
431 remoteconf->idvtype = IDTYPE_ADDRESS;
432 remoteconf->ike_frag = TRUE;
433 remoteconf->pcheck_level = PROP_CHECK_CLAIM;
434 remoteconf->certtype = ISAKMP_CERT_X509SIGN;
435 remoteconf->gen_policy = TRUE;
436 remoteconf->nat_traversal = TRUE;
437 remoteconf->dh_group = OAKLEY_ATTR_GRP_DESC_MODP1024;
438 remoteconf->script[SCRIPT_PHASE1_UP] = strtovchar("");
439 remoteconf->script[SCRIPT_PHASE1_DOWN] = strtovchar("");
440 oakley_setdhgroup(remoteconf->dh_group, &remoteconf->dhgrp);
441 remoteconf->remote = dupsaddr(targets[0]);
446 set_pre_shared_key(remoteconf, argv[4], argv[5]);
452 set_certificates(remoteconf, argv[4], argv[5], argv[6], argv[7]);
459 set_pre_shared_key(remoteconf, argv[4], argv[5]);
460 set_xauth_and_more(remoteconf, argv[6], argv[7], argv[8], argv[9]);
463 set_certificates(remoteconf, argv[4], argv[5], argv[6], argv[7]);
464 set_xauth_and_more(remoteconf, argv[8], argv[9], argv[10], argv[11]);
467 set_certificates(remoteconf, NULL, NULL, argv[4], argv[5]);
468 set_xauth_and_more(remoteconf, argv[6], argv[7], argv[8], argv[9]);
490 add_proposal(remoteconf, auth,
492 add_proposal(remoteconf, auth,
494 add_proposal(remoteconf, auth,
496 add_proposal(remoteconf, auth,
498 add_proposal(remoteconf, auth,
500 add_proposal(remoteconf, auth,
502 add_proposal(remoteconf, auth,
504 add_proposal(remoteconf, auth,
506 add_proposal(remoteconf, auth,
508 add_proposal(remoteconf, auth,
510 add_proposal(remoteconf, auth,
512 add_proposal(remoteconf, auth,
516 insrmconf(remoteconf);
519 if (remoteconf->xauth) {
520 isakmp_ph1begin_i(remoteconf, remoteconf->remote, source);