Home | History | Annotate | Download | only in test
      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 // kTLS13Variant is followed by a u8 denoting the TLS 1.3 variant to configure.
     43 static const uint16_t kTLS13Variant = 3;
     44 
     45 #endif  // HEADER_SSL_TEST_FUZZER_TAGS
     46