Avoid repeatedly scanning the list of extensions
authorMatt Caswell <matt@openssl.org>
Mon, 28 Nov 2016 09:31:59 +0000 (09:31 +0000)
committerMatt Caswell <matt@openssl.org>
Thu, 8 Dec 2016 17:18:56 +0000 (17:18 +0000)
commit70af3d8ed7e2497e8d0f34eb43a4404c493ba1cd
tree2fd645ad61d09324825d4557a1ccb10566224186
parent24b8e4b2c835d6bf52c2768d4d4a78ed7d7e85bb
Avoid repeatedly scanning the list of extensions

Because extensions were keyed by type which is sparse, we were continually
scanning the list to find the one we wanted. The way we stored them also
had the side effect that we were running initialisers/finalisers in a
different oder to the parsers. In this commit we change things so that we
instead key on an index value for each extension.

Perl changes reviewed by Richard Levitte. Non-perl changes reviewed by Rich
Salz

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
ssl/ssl_locl.h
ssl/statem/extensions.c
ssl/statem/extensions_clnt.c
ssl/statem/extensions_srvr.c
ssl/statem/statem_lib.c
ssl/statem/statem_locl.h
ssl/statem/statem_srvr.c
ssl/t1_lib.c
util/TLSProxy/Message.pm