fixed pts_probe_dh_groups warning
[strongswan.git] / src / libpts / pts / pts_dh_group.c
index f2c7d11..0e22dfe 100644 (file)
@@ -26,7 +26,7 @@ bool pts_probe_dh_groups(pts_dh_group_t *groups)
        diffie_hellman_group_t dh_group;
        const char *plugin_name;
        char format1[] = "  %s PTS Diffie Hellman Group %N[%s] available";
-       char format2[] = "  %s PTS Diffie Hellman Group %N[%s] not available";
+       char format2[] = "  %s PTS Diffie Hellman Group %N not available";
        
        *groups = 0;
 
@@ -72,7 +72,7 @@ bool pts_probe_dh_groups(pts_dh_group_t *groups)
        }
        else
        {
-               DBG1(DBG_PTS, format2, "mandatory", diffie_hellman_group_names, ECP_256_BIT, plugin_name);
+               DBG1(DBG_PTS, format2, "mandatory", diffie_hellman_group_names, ECP_256_BIT);
        }
 
        return FALSE;
@@ -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;
        }