]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Added an AAA identity authentication config option
authorMartin Willi <martin@revosec.ch>
Tue, 31 Aug 2010 15:26:20 +0000 (17:26 +0200)
committerMartin Willi <martin@revosec.ch>
Tue, 31 Aug 2010 15:26:20 +0000 (17:26 +0200)
src/libstrongswan/credentials/auth_cfg.c
src/libstrongswan/credentials/auth_cfg.h

index 4e7b4b111a4532113e896bfa51fb84e678ecde68..ce718b9cbf3988e24396a11342d524673a0f9de9 100644 (file)
@@ -119,6 +119,7 @@ static void destroy_entry_value(entry_t *entry)
        {
                case AUTH_RULE_IDENTITY:
                case AUTH_RULE_EAP_IDENTITY:
+               case AUTH_RULE_AAA_IDENTITY:
                case AUTH_RULE_GROUP:
                {
                        identification_t *id = (identification_t*)entry->value;
@@ -176,6 +177,7 @@ static void replace(auth_cfg_t *this, entry_enumerator_t *enumerator,
                                break;
                        case AUTH_RULE_IDENTITY:
                        case AUTH_RULE_EAP_IDENTITY:
+                       case AUTH_RULE_AAA_IDENTITY:
                        case AUTH_RULE_GROUP:
                        case AUTH_RULE_CA_CERT:
                        case AUTH_RULE_IM_CERT:
@@ -241,6 +243,7 @@ static void* get(private_auth_cfg_t *this, auth_rule_t type)
                        return (void*)VALIDATION_FAILED;
                case AUTH_RULE_IDENTITY:
                case AUTH_RULE_EAP_IDENTITY:
+               case AUTH_RULE_AAA_IDENTITY:
                case AUTH_RULE_GROUP:
                case AUTH_RULE_CA_CERT:
                case AUTH_RULE_IM_CERT:
@@ -276,6 +279,7 @@ static void add(private_auth_cfg_t *this, auth_rule_t type, ...)
                        break;
                case AUTH_RULE_IDENTITY:
                case AUTH_RULE_EAP_IDENTITY:
+               case AUTH_RULE_AAA_IDENTITY:
                case AUTH_RULE_GROUP:
                case AUTH_RULE_CA_CERT:
                case AUTH_RULE_IM_CERT:
@@ -390,6 +394,7 @@ static bool complies(private_auth_cfg_t *this, auth_cfg_t *constraints,
                        }
                        case AUTH_RULE_IDENTITY:
                        case AUTH_RULE_EAP_IDENTITY:
+                       case AUTH_RULE_AAA_IDENTITY:
                        {
                                identification_t *id1, *id2;
 
@@ -535,6 +540,7 @@ static void merge(private_auth_cfg_t *this, private_auth_cfg_t *other, bool copy
                                }
                                case AUTH_RULE_IDENTITY:
                                case AUTH_RULE_EAP_IDENTITY:
+                               case AUTH_RULE_AAA_IDENTITY:
                                case AUTH_RULE_GROUP:
                                {
                                        identification_t *id = (identification_t*)value;
@@ -622,6 +628,7 @@ static bool equals(private_auth_cfg_t *this, private_auth_cfg_t *other)
                                        }
                                        case AUTH_RULE_IDENTITY:
                                        case AUTH_RULE_EAP_IDENTITY:
+                                       case AUTH_RULE_AAA_IDENTITY:
                                        case AUTH_RULE_GROUP:
                                        {
                                                identification_t *id1, *id2;
@@ -706,6 +713,7 @@ static auth_cfg_t* clone_(private_auth_cfg_t *this)
                {
                        case AUTH_RULE_IDENTITY:
                        case AUTH_RULE_EAP_IDENTITY:
+                       case AUTH_RULE_AAA_IDENTITY:
                        case AUTH_RULE_GROUP:
                        {
                                identification_t *id = (identification_t*)entry->value;
index 9a5fdc0da61dadeec1b86679eb378fd8a41d0a15..19624a2fe95513637b3a8d871bbafb0328957c6b 100644 (file)
@@ -68,6 +68,8 @@ enum auth_rule_t {
        AUTH_RULE_IDENTITY,
        /** authentication class, auth_class_t */
        AUTH_RULE_AUTH_CLASS,
+       /** AAA-backend identity for EAP methods supporting it, identification_t* */
+       AUTH_RULE_AAA_IDENTITY,
        /** EAP identity to use within EAP-Identity exchange, identification_t* */
        AUTH_RULE_EAP_IDENTITY,
        /** EAP type to propose for peer authentication, eap_type_t */