diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2000-06-08 20:50:30 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2000-06-08 20:50:30 +0000 |
commit | 63ae56a0db48c1ef2a3836313743c1ffbce8bb10 (patch) | |
tree | c000acb2e980d0c280ece2b49c1b59b485c1e538 | |
parent | 6d3ca9d97f6eeba5c54fe900a6daaf067d4dff32 (diff) |
Merge with EOM 1.31
author: angelos
Initialize [Keynote]:Credential-directory.
author: ho
Autogenerated p1/p2 default lifetimes can be defined in config.
author: niklas
style
-rw-r--r-- | sbin/isakmpd/conf.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/sbin/isakmpd/conf.c b/sbin/isakmpd/conf.c index 86460694a21..3010de41086 100644 --- a/sbin/isakmpd/conf.c +++ b/sbin/isakmpd/conf.c @@ -1,5 +1,5 @@ -/* $OpenBSD: conf.c,v 1.15 2000/05/03 13:47:15 niklas Exp $ */ -/* $EOM: conf.c,v 1.28 2000/05/03 13:24:45 niklas Exp $ */ +/* $OpenBSD: conf.c,v 1.16 2000/06/08 20:50:29 niklas Exp $ */ +/* $EOM: conf.c,v 1.31 2000/05/18 05:10:18 angelos Exp $ */ /* * Copyright (c) 1998, 1999, 2000 Niklas Hallqvist. All rights reserved. @@ -181,7 +181,7 @@ conf_set_now (char *section, char *tag, char *value, int override, conf_remove_now (section, tag); else if (conf_get_str (section, tag)) { - if (is_default == 0) + if (!is_default) log_print ("conf_set: duplicate tag [%s]:%s, ignoring...\n", section, tag); return 1; @@ -337,7 +337,7 @@ void conf_load_defaults (int tr) { int enc, auth, hash, proto, mode, pfs; - char sect[256]; + char sect[256], *dflt; char *mm_auth[] = { "PRE_SHARED", "DSS", "RSA_SIG", NULL }; char *mm_hash[] = { "MD5", "SHA", NULL }; @@ -373,6 +373,11 @@ conf_load_defaults (int tr) 0, 1); #endif +#ifdef USE_KEYNOTE + conf_set (tr, "KeyNote", "Credential-directory", CONF_DFLT_KEYNOTE_CRED_DIR, + 0, 1); +#endif + /* Main modes */ for (enc = 0; mm_enc[enc]; enc ++) for (hash = 0; mm_hash[hash]; hash ++) @@ -459,16 +464,18 @@ conf_load_defaults (int tr) 1); } - /* Lifetimes */ + /* Lifetimes. XXX p1/p2 vs main/quick mode may be unclear. */ + dflt = conf_get_str ("General", "Default-phase-1-lifetime"); conf_set (tr, CONF_DFLT_TAG_LIFE_MAIN_MODE, "LIFE_TYPE", CONF_DFLT_TYPE_LIFE_MAIN_MODE, 0, 1); conf_set (tr, CONF_DFLT_TAG_LIFE_MAIN_MODE, "LIFE_DURATION", - CONF_DFLT_VAL_LIFE_MAIN_MODE, 0, 1); + (dflt ? dflt : CONF_DFLT_VAL_LIFE_MAIN_MODE), 0, 1); + dflt = conf_get_str ("General", "Default-phase-2-lifetime"); conf_set (tr, CONF_DFLT_TAG_LIFE_QUICK_MODE, "LIFE_TYPE", CONF_DFLT_TYPE_LIFE_QUICK_MODE, 0, 1); conf_set (tr, CONF_DFLT_TAG_LIFE_QUICK_MODE, "LIFE_DURATION", - CONF_DFLT_VAL_LIFE_QUICK_MODE, 0, 1); + (dflt ? dflt : CONF_DFLT_VAL_LIFE_QUICK_MODE), 0, 1); return; } |