udpkey.c: Use correct name and key size when client derives MAC key.
[udpkey] / udpkey.c
index 6081329..769bdb1 100644 (file)
--- a/udpkey.c
+++ b/udpkey.c
@@ -1012,7 +1012,7 @@ static int receive_v0(struct query *q, struct server *s, buf *bin, buf *bout)
      debug_ge("Z", s->k.g, Z); )
   derive(&s->k, R, Z, "cipher", s->k.cc->name, s->k.cc->keysz, &kk, &ksz);
   c = GC_INIT(s->k.cc, kk, ksz);
-  derive(&s->k, R, Z, "mac", s->k.cc->name, s->k.cc->keysz, &kk, &ksz);
+  derive(&s->k, R, Z, "mac", s->k.mc->name, s->k.mc->keysz, &kk, &ksz);
   m = GM_KEY(s->k.mc, kk, ksz);
 
   /* Find where the MAC tag is. */