diff options
author | Tim Taubert <ttaubert@mozilla.com> | 2017-03-14 15:24:18 +0100 |
---|---|---|
committer | Tim Taubert <ttaubert@mozilla.com> | 2017-03-14 15:24:18 +0100 |
commit | ed93b3356bba914d6d7ec72c2e03fc5bd1925326 (patch) | |
tree | 7e81ffdeb2181c102102e20514140c19dbd16d08 /fuzz/tls_client_config.cc | |
parent | c84fb4afcdeb8920340aa985718227efd8399efc (diff) | |
download | nss-hg-ed93b3356bba914d6d7ec72c2e03fc5bd1925326.tar.gz |
Bug 1339768 - Add TLS server fuzzers r=franziskus
Differential Revision: https://nss-review.dev.mozaws.net/D229
Diffstat (limited to 'fuzz/tls_client_config.cc')
-rw-r--r-- | fuzz/tls_client_config.cc | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/fuzz/tls_client_config.cc b/fuzz/tls_client_config.cc index 78ab591e3..81f3f57fe 100644 --- a/fuzz/tls_client_config.cc +++ b/fuzz/tls_client_config.cc @@ -4,10 +4,14 @@ #include "tls_client_config.h" -const uint64_t CONFIG_FAIL_CERT_AUTH = 1; -const uint64_t CONFIG_ENABLE_EXTENDED_MS = 2; -const uint64_t CONFIG_REQUIRE_DH_NAMED_GROUPS = 4; -const uint64_t CONFIG_ENABLE_FALSE_START = 8; +const uint64_t CONFIG_FAIL_CERT_AUTH = 0x01; +const uint64_t CONFIG_ENABLE_EXTENDED_MS = 0x02; +const uint64_t CONFIG_REQUIRE_DH_NAMED_GROUPS = 0x04; +const uint64_t CONFIG_ENABLE_FALSE_START = 0x08; +const uint64_t CONFIG_ENABLE_DEFLATE = 0x10; +const uint64_t CONFIG_ENABLE_CBC_RANDOM_IV = 0x20; +const uint64_t CONFIG_REQUIRE_SAFE_NEGOTIATION = 0x40; +const uint64_t CONFIG_ENABLE_CACHE = 0x80; // XOR 64-bit chunks of data to build a bitmap of config options derived from // the fuzzing input. This seems the only way to fuzz various options while @@ -33,3 +37,15 @@ bool ClientConfig::RequireDhNamedGroups() { bool ClientConfig::EnableFalseStart() { return config_ & CONFIG_ENABLE_FALSE_START; } + +bool ClientConfig::EnableDeflate() { return config_ & CONFIG_ENABLE_DEFLATE; } + +bool ClientConfig::EnableCbcRandomIv() { + return config_ & CONFIG_ENABLE_CBC_RANDOM_IV; +} + +bool ClientConfig::RequireSafeNegotiation() { + return config_ & CONFIG_REQUIRE_SAFE_NEGOTIATION; +} + +bool ClientConfig::EnableCache() { return config_ & CONFIG_ENABLE_CACHE; } |