From 3687df73a8a589e8030bbd938cd0cd1007a631dd Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Tue, 15 Dec 2020 13:24:58 +0000 Subject: [PATCH] Pageant: move extension list out into header file. That's a part of the protocol spec (ish), so it should be somewhere reasonably sensible rather than buried in the middle of a source file. --- pageant.c | 9 --------- pageant.h | 12 ++++++++++++ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/pageant.c b/pageant.c index ffc9762b..cbb48771 100644 --- a/pageant.c +++ b/pageant.c @@ -609,15 +609,6 @@ static bool reencrypt_key(PageantKey *pk) return true; } -#define PUTTYEXT(base) base "@putty.projects.tartarus.org" - -#define KNOWN_EXTENSIONS(X) \ - X(EXT_QUERY, "query") \ - X(EXT_ADD_PPK, PUTTYEXT("add-ppk")) \ - X(EXT_REENCRYPT, PUTTYEXT("reencrypt")) \ - X(EXT_REENCRYPT_ALL, PUTTYEXT("reencrypt-all")) \ - /* end of list */ - #define DECL_EXT_ENUM(id, name) id, enum Extension { KNOWN_EXTENSIONS(DECL_EXT_ENUM) EXT_UNKNOWN }; #define DEF_EXT_NAMES(id, name) PTRLEN_DECL_LITERAL(name), diff --git a/pageant.h b/pageant.h index 617133eb..8705eaa0 100644 --- a/pageant.h +++ b/pageant.h @@ -242,3 +242,15 @@ int pageant_reencrypt_key(struct pageant_pubkey *key, char **retstr); int pageant_reencrypt_all_keys(char **retstr); int pageant_sign(struct pageant_pubkey *key, ptrlen message, strbuf *out, uint32_t flags, char **retstr); + +/* + * Definitions for agent protocol extensions. + */ +#define PUTTYEXT(base) base "@putty.projects.tartarus.org" + +#define KNOWN_EXTENSIONS(X) \ + X(EXT_QUERY, "query") \ + X(EXT_ADD_PPK, PUTTYEXT("add-ppk")) \ + X(EXT_REENCRYPT, PUTTYEXT("reencrypt")) \ + X(EXT_REENCRYPT_ALL, PUTTYEXT("reencrypt-all")) \ + /* end of list */