]> git.ipfire.org Git - people/ms/strongswan.git/commitdiff
charon-cmd: match_me/match_other are optional in callback credentials
authorTobias Brunner <tobias@strongswan.org>
Fri, 12 Apr 2013 17:32:01 +0000 (19:32 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 8 May 2013 13:02:40 +0000 (15:02 +0200)
src/charon-cmd/cmd/cmd_creds.c

index 9a37edff50a08db2329ce892465b4ed47995518f..4626c6dbeada95c3b4a9738853f9b51b786dd610 100644 (file)
@@ -96,7 +96,14 @@ static shared_key_t* callback_shared(private_cmd_creds_t *this,
                return NULL;
        }
        this->prompted = TRUE;
-       *match_me = *match_other = ID_MATCH_PERFECT;
+       if (match_me)
+       {
+               *match_me = ID_MATCH_PERFECT;
+       }
+       if (match_other)
+       {
+               *match_other = ID_MATCH_PERFECT;
+       }
        return shared_key_create(type, chunk_clone(chunk_from_str(pwd)));
 }