From 99d512b7519c0a4e5c595e44c7533ae2130d0e08 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 7 Dec 2019 18:20:54 +0000 Subject: [PATCH] site: Introduce `pubkey' variable (twice) No functional change, but this will make a forthcoming commit easier to read. Signed-off-by: Ian Jackson --- site.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/site.c b/site.c index ce185d4..922aa59 100644 --- a/site.c +++ b/site.c @@ -756,8 +756,9 @@ static bool_t unpick_msg(struct site *st, uint32_t type, CHECK_AVAIL(msg,m->pklen); m->pk=buf_unprepend(msg,m->pklen); m->hashlen=msg->start-m->hashstart; + struct sigpubkey_if *pubkey=st->pubkey; - if (!st->pubkey->unpick(st->pubkey->st,msg,&m->sig)) { + if (!pubkey->unpick(pubkey->st,msg,&m->sig)) { return False; } @@ -904,10 +905,12 @@ static bool_t generate_msg3(struct site *st, const struct msg *prompt) static bool_t process_msg3_msg4(struct site *st, struct msg *m) { + struct sigpubkey_if *pubkey=st->pubkey; + /* Check signature and store g^x mod m */ - if (!st->pubkey->check(st->pubkey->st, - m->hashstart,m->hashlen, - &m->sig)) { + if (!pubkey->check(pubkey->st, + m->hashstart,m->hashlen, + &m->sig)) { slog(st,LOG_SEC,"msg3/msg4 signature failed check!"); return False; } -- 2.30.2