From 9641753e0fd146204d57b2a4165f552a81afade4 Mon Sep 17 00:00:00 2001 From: "dtucker@openbsd.org" Date: Mon, 6 Mar 2023 12:14:48 +0000 Subject: 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 --- kex.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'kex.h') 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 *); -- cgit v1.2.1