IKEv1 XAuth: Added plugin support for XAuth, which allows us to have plugins to talk to servers with different quirks for XAuth authentication.

This commit is contained in:
Clavister OpenSource
2012-03-20 17:31:11 +01:00
parent 781f4c8898
commit 9c5366446a
11 changed files with 678 additions and 0 deletions
@@ -96,6 +96,9 @@ bool plugin_feature_matches(plugin_feature_t *a, plugin_feature_t *b)
streq(a->arg.fetcher, b->arg.fetcher);
case FEATURE_CUSTOM:
return streq(a->arg.custom, b->arg.custom);
case FEATURE_XAUTH_SERVER:
case FEATURE_XAUTH_PEER:
return a->arg.xauth == b->arg.xauth;
}
}
return FALSE;
@@ -229,6 +232,14 @@ char* plugin_feature_get_string(plugin_feature_t *feature)
return str;
}
break;
case FEATURE_XAUTH_SERVER:
case FEATURE_XAUTH_PEER:
if (asprintf(&str, "%N:%N", plugin_feature_names, feature->type,
xauth_method_type_short_names, feature->arg.xauth) > 0)
{
return str;
}
break;
}
if (!str)
{