summaryrefslogtreecommitdiffstats
path: root/util/TLSProxy
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-11-28 09:31:59 +0000
committerMatt Caswell <matt@openssl.org>2016-12-08 17:18:56 +0000
commit70af3d8ed7e2497e8d0f34eb43a4404c493ba1cd (patch)
tree2fd645ad61d09324825d4557a1ccb10566224186 /util/TLSProxy
parent24b8e4b2c835d6bf52c2768d4d4a78ed7d7e85bb (diff)
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>
Diffstat (limited to 'util/TLSProxy')
-rw-r--r--util/TLSProxy/Message.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/util/TLSProxy/Message.pm b/util/TLSProxy/Message.pm
index 6fcb9d9525..4f07ee3d3f 100644
--- a/util/TLSProxy/Message.pm
+++ b/util/TLSProxy/Message.pm
@@ -67,9 +67,10 @@ use constant {
EXT_SESSION_TICKET => 35,
EXT_SUPPORTED_VERSIONS => 43,
EXT_KEY_SHARE => 40,
- # This extension does not exist and isn't recognised by OpenSSL.
- # We use it to test handling of duplicate extensions.
- EXT_DUPLICATE_EXTENSION => 1234
+ # This extension is an unofficial extension only ever written by OpenSSL
+ # (i.e. not read), and even then only when enabled. We use it to test
+ # handling of duplicate extensions.
+ EXT_DUPLICATE_EXTENSION => 0xfde8
};
my $payload = "";