chiark / gitweb /
server/keyexch.c: Check that all of the algorithms match when setting up.
[tripe] / server / keyexch.c
index 2502fa398d797578378448df7578914710d4f034..34114b79c655515dad889eb0aa0b763841853f8b 100644 (file)
@@ -1479,8 +1479,8 @@ int kx_init(keyexch *kx, peer *p, keyset **ks, unsigned f)
 {
   if ((kx->kpriv = km_findpriv(p_privtag(p))) == 0) goto fail_0;
   if ((kx->kpub = km_findpub(p_tag(p))) == 0) goto fail_1;
-  if (!group_samep(kx->kpriv->g, kx->kpub->g)) {
-    a_warn("KX", "?PEER", kx->p, "group-mismatch",
+  if (!km_samealgsp(kx->kpriv, kx->kpub)) {
+    a_warn("KX", "?PEER", p, "group-mismatch",
           "local-private-key", "%s", p_privtag(p),
           "peer-public-key", "%s", p_tag(p),
           A_END);