Fixed bug for updating supported diffie hellman groups
authorSansar Choinyambuu <schoinya@hsr.ch>
Fri, 23 Sep 2011 14:04:37 +0000 (16:04 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Mon, 28 Nov 2011 13:34:20 +0000 (14:34 +0100)
src/libpts/pts/pts_dh_group.c

index f2c7d11..92f0984 100644 (file)
@@ -97,21 +97,21 @@ bool pts_update_supported_dh_groups(char *dh_group, pts_dh_group_t *groups)
        else if (strcaseeq(dh_group, "ike14"))
        {
                /* remove DH Group 19 and 20 */
-               *groups = ~PTS_DH_GROUP_IKE20 | ~PTS_DH_GROUP_IKE19;
+               *groups = ~PTS_DH_GROUP_IKE20 & ~PTS_DH_GROUP_IKE19;
                return TRUE;
        }
        else if (strcaseeq(dh_group, "ike5"))
        {
                /* remove DH Group 14, 19 and 20 */
-               *groups = ~PTS_DH_GROUP_IKE20 | ~PTS_DH_GROUP_IKE19
-               | ~PTS_DH_GROUP_IKE14;
+               *groups = ~PTS_DH_GROUP_IKE20 & ~PTS_DH_GROUP_IKE19
+               & ~PTS_DH_GROUP_IKE14;
                return TRUE;
        }
        else if (strcaseeq(dh_group, "ike2"))
        {
                /* remove DH Group 5, 14, 19 and 20 */
-               *groups = ~PTS_DH_GROUP_IKE20 | ~PTS_DH_GROUP_IKE19 |
-               ~PTS_DH_GROUP_IKE14 | ~PTS_DH_GROUP_IKE5;
+               *groups = ~PTS_DH_GROUP_IKE20 & ~PTS_DH_GROUP_IKE19 &
+               ~PTS_DH_GROUP_IKE14 & ~PTS_DH_GROUP_IKE5;
                return TRUE;
        }