IKEv1 XAuth: Added plugin support for XAuth, which allows us to have plugins to talk...
[strongswan.git] / src / libstrongswan / plugins / plugin_feature.c
index 2a97205..b2bf419 100644 (file)
@@ -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)
        {