chiark / gitweb /
keyexch, keymgmt: Include the peer's public key in the check hash.
[tripe] / keymgmt.c
index 7163ddda5cd09720af6e4c15365ba0e81898972f..f645d1565a1de17fe7bbbb5374ae27b2513f8f36 100644 (file)
--- a/keymgmt.c
+++ b/keymgmt.c
@@ -34,6 +34,7 @@
 
 group *gg;
 mp *kpriv;
+ge *kpub;
 algswitch algs;
 
 /*----- Static variables --------------------------------------------------*/
@@ -398,6 +399,11 @@ tymatch:;
   if (kpriv)
     mp_drop(kpriv);
 
+  if (kpub)
+    G_DESTROY(g, kpub);
+  kpub = G_CREATE(g);
+  G_EXP(g, kpub, g->g, x);
+
   /* --- Dump out the group --- */
 
   IF_TRACING(T_KEYMGMT, {