summaryrefslogtreecommitdiffstats
path: root/kex.h
diff options
context:
space:
mode:
authordtucker@openbsd.org <dtucker@openbsd.org>2023-03-06 12:14:48 +0000
committerDarren Tucker <dtucker@dtucker.net>2023-03-06 23:31:52 +1100
commit9641753e0fd146204d57b2a4165f552a81afade4 (patch)
tree78feed3f9ff1590ae36a14355b308e887e881273 /kex.h
parentaa59d6a489fb20973fa461d0fdb1110db412947b (diff)
upstream: Refactor creation of KEX proposal.
This adds kex_proposal_populate_entries (and corresponding free) which populates the KEX proposal array with dynamically allocated strings. This replaces the previous mix of static and dynamic that has been the source of previous leaks and bugs. Remove unused compat functions. With & ok djm@. OpenBSD-Commit-ID: f2f99da4aae2233cb18bf9c749320c5e040a9c7b
Diffstat (limited to 'kex.h')
-rw-r--r--kex.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/kex.h b/kex.h
index c3532950..8b54e3f4 100644
--- a/kex.h
+++ b/kex.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: kex.h,v 1.117 2022/01/06 21:55:23 djm Exp $ */
+/* $OpenBSD: kex.h,v 1.118 2023/03/06 12:14:48 dtucker Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
@@ -182,6 +182,9 @@ int kex_names_valid(const char *);
char *kex_alg_list(char);
char *kex_names_cat(const char *, const char *);
int kex_assemble_names(char **, const char *, const char *);
+void kex_proposal_populate_entries(struct ssh *, char *prop[PROPOSAL_MAX],
+ const char *, const char *, const char *, const char *, const char *);
+void kex_proposal_free_entries(char *prop[PROPOSAL_MAX]);
int kex_exchange_identification(struct ssh *, int, const char *);