• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright (c) 2017, Google Inc.
2  *
3  * Permission to use, copy, modify, and/or distribute this software for any
4  * purpose with or without fee is hereby granted, provided that the above
5  * copyright notice and this permission notice appear in all copies.
6  *
7  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
10  * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
12  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
13  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
14 
15 #ifndef HEADER_SSL_TEST_FUZZER_TAGS
16 #define HEADER_SSL_TEST_FUZZER_TAGS
17 
18 #include <stdint.h>
19 
20 
21 // SSL fuzzer tag constants.
22 //
23 // The TLS client and server fuzzers coordinate with bssl_shim on a common
24 // format to encode configuration parameters in a fuzzer file. To add a new
25 // configuration, define a tag, update |SetupTest| in fuzzer.h to parse it, and
26 // update |WriteSettings| in bssl_shim to serialize it. Finally, record
27 // transcripts from a test run, and use the BORINGSSL_FUZZER_DEBUG environment
28 // variable to confirm the transcripts are compatible.
29 
30 // kDataTag denotes that the remainder of the input should be passed to the TLS
31 // stack.
32 static const uint16_t kDataTag = 0;
33 
34 // kSessionTag is followed by a u24-length-prefixed serialized SSL_SESSION to
35 // resume.
36 static const uint16_t kSessionTag = 1;
37 
38 // kRequestClientCert denotes that the server should request client
39 // certificates.
40 static const uint16_t kRequestClientCert = 2;
41 
42 // kHandoffTag is followed by the output of |SSL_serialize_handoff|.
43 static const uint16_t kHandoffTag = 3;
44 
45 // kHandbackTag is followed by te output of |SSL_serialize_handback|.
46 static const uint16_t kHandbackTag = 4;
47 
48 #endif  // HEADER_SSL_TEST_FUZZER_TAGS
49