Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2022-09-13 22:53:03 +0300
committerSimon Tatham <anakin@pobox.com>2022-09-13 22:53:03 +0300
commitc1a4eda9f6ec5301eeb83def1ecb453f659fa7d3 (patch)
tree0cd8d1a365f5e7e8e603f99ecd30f18bcb089f9b
parent2fbc122e0e3c1528c15f7064b01a61701f1d4da9 (diff)
GSSAPI kex: don't call dh_is_gex() on ECDH algorithms.
dh_is_gex() expects to find a 'struct dh_extra' in the 'extra' field of the kex_alg you pass in, and won't look kindly on finding an instance of some totally different structure type. We were being careful about that everywhere in the GSSAPI kex code except for the final free step.
-rw-r--r--ssh/kex2-client.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ssh/kex2-client.c b/ssh/kex2-client.c
index b890c023..26159bb5 100644
--- a/ssh/kex2-client.c
+++ b/ssh/kex2-client.c
@@ -559,10 +559,10 @@ void ssh2kex_coroutine(struct ssh2_transport_state *s, bool *aborted)
dh_cleanup(s->dh_ctx);
s->dh_ctx = NULL;
mp_free(s->f); s->f = NULL;
- }
- if (dh_is_gex(s->kex_alg)) {
- mp_free(s->g); s->g = NULL;
- mp_free(s->p); s->p = NULL;
+ if (dh_is_gex(s->kex_alg)) {
+ mp_free(s->g); s->g = NULL;
+ mp_free(s->p); s->p = NULL;
+ }
}
#endif
} else {