• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Based on BoringSSL's client.c fuzzer */
2 
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6 
7 #include <assert.h>
8 #include <openssl/err.h>
9 #include <openssl/rand.h>
10 #include <openssl/ssl.h>
11 #include <stdint.h>
12 #include <string.h>
13 #include <unistd.h>
14 
15 #include <hf_ssl_lib.h>
16 #include <libhfuzz/libhfuzz.h>
17 
18 static const uint8_t kCertificateDER[] = {0x30, 0x82, 0x05, 0x65, 0x30, 0x82, 0x03, 0x4d, 0x02,
19     0x09, 0x00, 0xe8, 0x66, 0xed, 0xc9, 0x66, 0xa7, 0xd1, 0xac, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86,
20     0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30, 0x76, 0x31, 0x0b, 0x30, 0x09, 0x06,
21     0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x41, 0x55, 0x31, 0x0c, 0x30, 0x0a, 0x06, 0x03, 0x55, 0x04,
22     0x08, 0x0c, 0x03, 0x41, 0x55, 0x53, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c,
23     0x06, 0x53, 0x79, 0x64, 0x6e, 0x65, 0x79, 0x31, 0x21, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x04, 0x0a,
24     0x0c, 0x18, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x20, 0x57, 0x69, 0x64, 0x67, 0x69,
25     0x74, 0x73, 0x20, 0x50, 0x74, 0x79, 0x20, 0x4c, 0x74, 0x64, 0x31, 0x25, 0x30, 0x23, 0x06, 0x03,
26     0x55, 0x04, 0x03, 0x0c, 0x1c, 0x61, 0x75, 0x73, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x61, 0x2e, 0x6e,
27     0x6f, 0x6e, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x61, 0x63, 0x61, 0x63,
28     0x61, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x36, 0x30, 0x39, 0x33, 0x30, 0x31, 0x39, 0x30, 0x33, 0x33,
29     0x39, 0x5a, 0x17, 0x0d, 0x31, 0x37, 0x30, 0x39, 0x32, 0x35, 0x31, 0x39, 0x30, 0x33, 0x33, 0x39,
30     0x5a, 0x30, 0x73, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x41, 0x55,
31     0x31, 0x0c, 0x30, 0x0a, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x03, 0x41, 0x55, 0x53, 0x31, 0x0f,
32     0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x06, 0x53, 0x79, 0x64, 0x6e, 0x65, 0x79, 0x31,
33     0x21, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x18, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e,
34     0x65, 0x74, 0x20, 0x57, 0x69, 0x64, 0x67, 0x69, 0x74, 0x73, 0x20, 0x50, 0x74, 0x79, 0x20, 0x4c,
35     0x74, 0x64, 0x31, 0x22, 0x30, 0x20, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x19, 0x77, 0x77, 0x77,
36     0x2e, 0x61, 0x75, 0x73, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x61, 0x2e, 0x6e, 0x6f, 0x6e, 0x65, 0x78,
37     0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x30, 0x82, 0x02, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86,
38     0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82, 0x02, 0x0f, 0x00, 0x30, 0x82,
39     0x02, 0x0a, 0x02, 0x82, 0x02, 0x01, 0x00, 0xca, 0x91, 0xe1, 0x6a, 0xf8, 0xd9, 0xcc, 0x06, 0x07,
40     0x60, 0x16, 0x21, 0x60, 0xdc, 0xbb, 0xfc, 0x36, 0x3a, 0xf2, 0x93, 0x3c, 0x73, 0xc2, 0x96, 0xa1,
41     0xe8, 0x10, 0xbf, 0x11, 0xb8, 0xc9, 0x1c, 0x37, 0x67, 0x9b, 0x85, 0x00, 0xa1, 0x6f, 0x66, 0x2f,
42     0xf5, 0x04, 0x6e, 0x1c, 0x22, 0x83, 0x7a, 0x6e, 0xab, 0x28, 0x43, 0xfe, 0x32, 0xbd, 0xed, 0xa0,
43     0x7a, 0x4a, 0x84, 0x14, 0x85, 0x79, 0x8a, 0x1e, 0xf4, 0x4f, 0x12, 0x6c, 0xe2, 0xfd, 0xde, 0x47,
44     0x29, 0xe5, 0xe2, 0xad, 0x0d, 0x87, 0x45, 0xcf, 0x07, 0xdb, 0x8c, 0x40, 0xa1, 0xee, 0x3f, 0x77,
45     0xcb, 0xee, 0xcc, 0xe2, 0x17, 0x79, 0xcc, 0x4b, 0xd5, 0x83, 0x9d, 0xe1, 0x48, 0xce, 0x33, 0xf7,
46     0xd4, 0x68, 0x46, 0x14, 0x8c, 0x97, 0x82, 0xde, 0xde, 0x9d, 0x76, 0x88, 0x73, 0xf4, 0xf9, 0xcf,
47     0x26, 0x32, 0x75, 0x19, 0x9b, 0x70, 0x81, 0xe5, 0x19, 0xb0, 0x8c, 0x90, 0x8b, 0x5e, 0x1a, 0xbd,
48     0xc7, 0x95, 0xfb, 0xf2, 0xea, 0x77, 0x6a, 0x7a, 0xce, 0x67, 0x51, 0xc6, 0x24, 0x99, 0x95, 0x23,
49     0xc2, 0x04, 0xb8, 0x44, 0xd8, 0x70, 0xf3, 0xaf, 0x78, 0xc4, 0x71, 0xb1, 0x76, 0x11, 0x0c, 0xe7,
50     0x50, 0x16, 0xc8, 0x33, 0x64, 0xcd, 0xdd, 0x0b, 0xaf, 0xb8, 0x2d, 0x4b, 0x21, 0xb1, 0x64, 0xa1,
51     0x22, 0x1b, 0xad, 0x8f, 0x42, 0x97, 0xcc, 0x64, 0x30, 0xb3, 0x3f, 0xb4, 0xfc, 0x6e, 0x15, 0xa4,
52     0xf3, 0x96, 0x1f, 0xd8, 0xe4, 0xac, 0xa1, 0xd5, 0xdb, 0x9e, 0x28, 0xb3, 0xac, 0x17, 0x54, 0x2a,
53     0x53, 0xeb, 0x00, 0x62, 0x48, 0xaa, 0x74, 0x7e, 0x84, 0x5a, 0x50, 0xcc, 0x15, 0x48, 0x96, 0x19,
54     0xea, 0xc7, 0xdc, 0x2b, 0x3d, 0x5f, 0xff, 0x03, 0x6a, 0x82, 0x43, 0xf3, 0x9b, 0x2e, 0xf3, 0x43,
55     0x50, 0x83, 0xcd, 0xb3, 0x98, 0x50, 0x51, 0x9d, 0x4a, 0x1e, 0x7c, 0x58, 0xfc, 0xe5, 0x7b, 0xb6,
56     0xe0, 0x8e, 0xce, 0xe3, 0xcf, 0x53, 0x50, 0x12, 0x85, 0x51, 0x49, 0x9a, 0x28, 0x59, 0x6b, 0x68,
57     0xef, 0x94, 0x20, 0xc8, 0x72, 0x5a, 0x7f, 0x7d, 0xaa, 0x8b, 0x34, 0xf5, 0xc4, 0xc6, 0xed, 0xc2,
58     0x1c, 0xa9, 0xfa, 0xcf, 0x51, 0x2e, 0xa2, 0x2b, 0xf0, 0xfd, 0x4d, 0x49, 0xee, 0xb3, 0xa4, 0xee,
59     0xd4, 0x7b, 0xec, 0xa2, 0xec, 0xd4, 0xf8, 0xbf, 0x16, 0x79, 0x61, 0x0c, 0x1c, 0x39, 0xd3, 0x75,
60     0x1f, 0x2d, 0x16, 0xcd, 0x7c, 0x4a, 0xe5, 0x01, 0x90, 0x91, 0x26, 0x92, 0xd9, 0x4e, 0x89, 0xc4,
61     0x58, 0xd8, 0x08, 0x19, 0xa5, 0x8d, 0x85, 0x29, 0xfd, 0xae, 0xb2, 0xc9, 0x72, 0xca, 0x48, 0x9b,
62     0xbe, 0x14, 0x03, 0x03, 0xf1, 0x72, 0xb4, 0x6d, 0x19, 0x87, 0xe9, 0xc9, 0xc0, 0x9e, 0x95, 0xac,
63     0x79, 0xcf, 0x24, 0xee, 0xc4, 0x4f, 0x84, 0x25, 0xc7, 0xc0, 0xae, 0x30, 0x04, 0x3c, 0xa9, 0x52,
64     0x75, 0x6f, 0x97, 0x79, 0x98, 0xc0, 0xd7, 0xeb, 0x84, 0x9a, 0x57, 0x99, 0x3c, 0x01, 0x8b, 0x3b,
65     0xc0, 0x91, 0xe3, 0xfd, 0xe1, 0x88, 0x88, 0xa0, 0x34, 0xd8, 0x5d, 0xe8, 0xe6, 0xba, 0xab, 0x76,
66     0x6f, 0x33, 0x3e, 0x97, 0x04, 0x93, 0xd3, 0x4c, 0x22, 0xb1, 0xa9, 0x79, 0x66, 0xc5, 0xb6, 0xbb,
67     0x23, 0x50, 0xbe, 0x54, 0x1a, 0xab, 0x7a, 0x99, 0x9e, 0x2b, 0x4f, 0xed, 0x5a, 0x7a, 0x5c, 0xbd,
68     0xf2, 0x32, 0x34, 0x02, 0x82, 0x4c, 0xb8, 0x11, 0x65, 0x22, 0x77, 0x42, 0x7f, 0xb1, 0x7b, 0x98,
69     0x1b, 0x82, 0x8f, 0xe7, 0x1f, 0x7b, 0x07, 0x21, 0x98, 0x60, 0xb4, 0x7b, 0xe2, 0x9a, 0xcb, 0xe9,
70     0xb3, 0x49, 0x35, 0x86, 0xea, 0x8b, 0x21, 0x46, 0xe9, 0x5b, 0x16, 0xe8, 0x2c, 0xe5, 0x9c, 0xb5,
71     0x96, 0x45, 0xce, 0x0c, 0x40, 0xbb, 0x97, 0x02, 0x03, 0x01, 0x00, 0x01, 0x30, 0x0d, 0x06, 0x09,
72     0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x82, 0x02, 0x01, 0x00,
73     0x56, 0x8f, 0xf2, 0xb7, 0x14, 0x35, 0x20, 0xf5, 0x42, 0x8b, 0x51, 0xd4, 0x65, 0x10, 0xf3, 0x8a,
74     0x38, 0x5d, 0x3b, 0xd0, 0x48, 0xb9, 0x8e, 0x5a, 0x87, 0x29, 0x67, 0xd7, 0x7f, 0x48, 0x29, 0x97,
75     0x7b, 0xad, 0xba, 0x09, 0xe1, 0xf8, 0x19, 0xde, 0x3f, 0x33, 0x04, 0x35, 0x37, 0x8d, 0x6d, 0xb8,
76     0x7f, 0x29, 0x2b, 0xd4, 0xfe, 0x1f, 0x4e, 0xa7, 0x9d, 0xcf, 0x4d, 0x4a, 0x9e, 0x2d, 0x01, 0x8e,
77     0x2d, 0x0c, 0xa3, 0x68, 0x37, 0xfc, 0x47, 0xd8, 0xb6, 0x6d, 0x37, 0xf1, 0xf8, 0xb0, 0x71, 0xc1,
78     0xb5, 0x29, 0x7e, 0x88, 0x96, 0xa7, 0x93, 0xae, 0x4c, 0x5d, 0x89, 0x10, 0x5e, 0x6b, 0x04, 0xcf,
79     0x7f, 0x6d, 0x2e, 0xad, 0x2f, 0xa7, 0x0f, 0xfc, 0x5d, 0x48, 0x5a, 0xd3, 0x70, 0xbc, 0x86, 0xeb,
80     0x75, 0xbe, 0xd1, 0x9f, 0x5d, 0x62, 0xb7, 0xcb, 0x7b, 0x1e, 0x9b, 0x06, 0x7a, 0xe7, 0xe5, 0x05,
81     0x68, 0x52, 0x7e, 0x15, 0x27, 0xbf, 0x4c, 0x65, 0x45, 0xce, 0x18, 0xa9, 0x49, 0xa6, 0x12, 0xbf,
82     0x8c, 0x33, 0x01, 0xdc, 0xc6, 0x5c, 0x3e, 0x50, 0x77, 0xaf, 0x8e, 0x97, 0xfd, 0xcc, 0x51, 0x36,
83     0x82, 0x46, 0xd8, 0x7e, 0xe6, 0xa8, 0x5a, 0x91, 0x26, 0x12, 0x05, 0x0b, 0x50, 0xf1, 0x8f, 0x21,
84     0x3a, 0x85, 0x0e, 0x5f, 0x09, 0xf1, 0x6c, 0xea, 0xb4, 0x6b, 0x33, 0xbd, 0xb1, 0x24, 0xed, 0x53,
85     0xbb, 0x3f, 0x88, 0xd3, 0xfb, 0xba, 0x4a, 0x87, 0x0c, 0xbf, 0x83, 0x92, 0xb3, 0x5c, 0x7d, 0x85,
86     0x2e, 0x10, 0x65, 0xab, 0xa7, 0x3d, 0x40, 0xdd, 0x8e, 0xe3, 0xba, 0xbb, 0x1e, 0x58, 0xe9, 0x1c,
87     0x76, 0x1d, 0xe9, 0x81, 0xf4, 0x9d, 0x77, 0x2f, 0x44, 0x00, 0x4d, 0xb9, 0x2c, 0x31, 0x5b, 0x42,
88     0x6f, 0x10, 0x35, 0xed, 0x08, 0xc4, 0x51, 0xb3, 0x01, 0x9e, 0xce, 0x27, 0x33, 0xd0, 0x44, 0x98,
89     0x95, 0x3c, 0xe2, 0x9d, 0xdb, 0x58, 0xff, 0xc7, 0xc7, 0xea, 0x9b, 0x3f, 0xe2, 0xa2, 0x37, 0x5e,
90     0x8d, 0x94, 0xa2, 0xb0, 0x55, 0x68, 0x89, 0x10, 0xd7, 0xb9, 0x3c, 0xc0, 0xec, 0xe4, 0x36, 0x46,
91     0x3c, 0x47, 0xb9, 0x8d, 0x74, 0x17, 0xad, 0xca, 0x07, 0x67, 0x27, 0xea, 0xba, 0xd0, 0xa7, 0x2c,
92     0x06, 0x0f, 0x2d, 0xa3, 0x41, 0xf8, 0x28, 0x3f, 0x88, 0x38, 0x25, 0x61, 0xf8, 0x87, 0x92, 0x63,
93     0xd8, 0x5c, 0x2b, 0xff, 0x3c, 0xa1, 0xff, 0xb0, 0x98, 0x21, 0xcd, 0x25, 0x7e, 0x5f, 0xa5, 0x05,
94     0xf5, 0x90, 0x0d, 0xf7, 0xeb, 0x1a, 0xff, 0xe2, 0xeb, 0x1b, 0x9a, 0x1f, 0x49, 0xdb, 0x65, 0xc4,
95     0x1f, 0x32, 0x41, 0xea, 0x79, 0xb7, 0x85, 0x73, 0x01, 0x39, 0x67, 0x85, 0x49, 0x57, 0xe0, 0x21,
96     0xf8, 0x61, 0x26, 0x30, 0x89, 0xd1, 0x03, 0xef, 0x1d, 0xb9, 0x3e, 0x71, 0x64, 0x31, 0xb3, 0xe9,
97     0x70, 0x91, 0x78, 0x46, 0x0a, 0x9a, 0x33, 0xe5, 0x21, 0x42, 0x87, 0x26, 0xef, 0xaf, 0xe5, 0xc7,
98     0x6a, 0x2f, 0x3c, 0x66, 0xe6, 0xd8, 0x68, 0xc8, 0x98, 0xd8, 0xae, 0x68, 0x47, 0x52, 0x23, 0xc1,
99     0x9f, 0x35, 0xb8, 0xc4, 0xf4, 0x42, 0xa7, 0xd4, 0xf3, 0x3f, 0xb0, 0xcd, 0x04, 0x7d, 0x40, 0x08,
100     0x22, 0x12, 0xe9, 0xe1, 0xbd, 0x4d, 0x02, 0x23, 0x4b, 0x9f, 0x98, 0x08, 0x74, 0x1e, 0xdd, 0x8d,
101     0xd4, 0xa2, 0x87, 0x29, 0xd3, 0xb4, 0xe6, 0x65, 0x4c, 0xda, 0x5f, 0x6d, 0x5a, 0xb3, 0x6f, 0xaa,
102     0xcf, 0xe5, 0xd6, 0x50, 0x8d, 0xca, 0x60, 0x07, 0xf1, 0x70, 0xa8, 0x8d, 0x5c, 0x8b, 0x18, 0xc4,
103     0x0b, 0xfa, 0x76, 0xb3, 0xca, 0xb7, 0xc2, 0xfe, 0x08, 0x51, 0x1e, 0x07, 0xa3, 0xf4, 0x1c, 0x4f,
104     0x48, 0x77, 0xb5, 0x3e, 0x23, 0x4b, 0xbd, 0xf2, 0xa8, 0x2f, 0xc3, 0xd7, 0xf3, 0x61, 0x1b, 0x9c};
105 
106 static const uint8_t kRSAPrivateKeyDER[] = {0x30, 0x82, 0x09, 0x2a, 0x02, 0x01, 0x00, 0x02, 0x82,
107     0x02, 0x01, 0x00, 0xca, 0x91, 0xe1, 0x6a, 0xf8, 0xd9, 0xcc, 0x06, 0x07, 0x60, 0x16, 0x21, 0x60,
108     0xdc, 0xbb, 0xfc, 0x36, 0x3a, 0xf2, 0x93, 0x3c, 0x73, 0xc2, 0x96, 0xa1, 0xe8, 0x10, 0xbf, 0x11,
109     0xb8, 0xc9, 0x1c, 0x37, 0x67, 0x9b, 0x85, 0x00, 0xa1, 0x6f, 0x66, 0x2f, 0xf5, 0x04, 0x6e, 0x1c,
110     0x22, 0x83, 0x7a, 0x6e, 0xab, 0x28, 0x43, 0xfe, 0x32, 0xbd, 0xed, 0xa0, 0x7a, 0x4a, 0x84, 0x14,
111     0x85, 0x79, 0x8a, 0x1e, 0xf4, 0x4f, 0x12, 0x6c, 0xe2, 0xfd, 0xde, 0x47, 0x29, 0xe5, 0xe2, 0xad,
112     0x0d, 0x87, 0x45, 0xcf, 0x07, 0xdb, 0x8c, 0x40, 0xa1, 0xee, 0x3f, 0x77, 0xcb, 0xee, 0xcc, 0xe2,
113     0x17, 0x79, 0xcc, 0x4b, 0xd5, 0x83, 0x9d, 0xe1, 0x48, 0xce, 0x33, 0xf7, 0xd4, 0x68, 0x46, 0x14,
114     0x8c, 0x97, 0x82, 0xde, 0xde, 0x9d, 0x76, 0x88, 0x73, 0xf4, 0xf9, 0xcf, 0x26, 0x32, 0x75, 0x19,
115     0x9b, 0x70, 0x81, 0xe5, 0x19, 0xb0, 0x8c, 0x90, 0x8b, 0x5e, 0x1a, 0xbd, 0xc7, 0x95, 0xfb, 0xf2,
116     0xea, 0x77, 0x6a, 0x7a, 0xce, 0x67, 0x51, 0xc6, 0x24, 0x99, 0x95, 0x23, 0xc2, 0x04, 0xb8, 0x44,
117     0xd8, 0x70, 0xf3, 0xaf, 0x78, 0xc4, 0x71, 0xb1, 0x76, 0x11, 0x0c, 0xe7, 0x50, 0x16, 0xc8, 0x33,
118     0x64, 0xcd, 0xdd, 0x0b, 0xaf, 0xb8, 0x2d, 0x4b, 0x21, 0xb1, 0x64, 0xa1, 0x22, 0x1b, 0xad, 0x8f,
119     0x42, 0x97, 0xcc, 0x64, 0x30, 0xb3, 0x3f, 0xb4, 0xfc, 0x6e, 0x15, 0xa4, 0xf3, 0x96, 0x1f, 0xd8,
120     0xe4, 0xac, 0xa1, 0xd5, 0xdb, 0x9e, 0x28, 0xb3, 0xac, 0x17, 0x54, 0x2a, 0x53, 0xeb, 0x00, 0x62,
121     0x48, 0xaa, 0x74, 0x7e, 0x84, 0x5a, 0x50, 0xcc, 0x15, 0x48, 0x96, 0x19, 0xea, 0xc7, 0xdc, 0x2b,
122     0x3d, 0x5f, 0xff, 0x03, 0x6a, 0x82, 0x43, 0xf3, 0x9b, 0x2e, 0xf3, 0x43, 0x50, 0x83, 0xcd, 0xb3,
123     0x98, 0x50, 0x51, 0x9d, 0x4a, 0x1e, 0x7c, 0x58, 0xfc, 0xe5, 0x7b, 0xb6, 0xe0, 0x8e, 0xce, 0xe3,
124     0xcf, 0x53, 0x50, 0x12, 0x85, 0x51, 0x49, 0x9a, 0x28, 0x59, 0x6b, 0x68, 0xef, 0x94, 0x20, 0xc8,
125     0x72, 0x5a, 0x7f, 0x7d, 0xaa, 0x8b, 0x34, 0xf5, 0xc4, 0xc6, 0xed, 0xc2, 0x1c, 0xa9, 0xfa, 0xcf,
126     0x51, 0x2e, 0xa2, 0x2b, 0xf0, 0xfd, 0x4d, 0x49, 0xee, 0xb3, 0xa4, 0xee, 0xd4, 0x7b, 0xec, 0xa2,
127     0xec, 0xd4, 0xf8, 0xbf, 0x16, 0x79, 0x61, 0x0c, 0x1c, 0x39, 0xd3, 0x75, 0x1f, 0x2d, 0x16, 0xcd,
128     0x7c, 0x4a, 0xe5, 0x01, 0x90, 0x91, 0x26, 0x92, 0xd9, 0x4e, 0x89, 0xc4, 0x58, 0xd8, 0x08, 0x19,
129     0xa5, 0x8d, 0x85, 0x29, 0xfd, 0xae, 0xb2, 0xc9, 0x72, 0xca, 0x48, 0x9b, 0xbe, 0x14, 0x03, 0x03,
130     0xf1, 0x72, 0xb4, 0x6d, 0x19, 0x87, 0xe9, 0xc9, 0xc0, 0x9e, 0x95, 0xac, 0x79, 0xcf, 0x24, 0xee,
131     0xc4, 0x4f, 0x84, 0x25, 0xc7, 0xc0, 0xae, 0x30, 0x04, 0x3c, 0xa9, 0x52, 0x75, 0x6f, 0x97, 0x79,
132     0x98, 0xc0, 0xd7, 0xeb, 0x84, 0x9a, 0x57, 0x99, 0x3c, 0x01, 0x8b, 0x3b, 0xc0, 0x91, 0xe3, 0xfd,
133     0xe1, 0x88, 0x88, 0xa0, 0x34, 0xd8, 0x5d, 0xe8, 0xe6, 0xba, 0xab, 0x76, 0x6f, 0x33, 0x3e, 0x97,
134     0x04, 0x93, 0xd3, 0x4c, 0x22, 0xb1, 0xa9, 0x79, 0x66, 0xc5, 0xb6, 0xbb, 0x23, 0x50, 0xbe, 0x54,
135     0x1a, 0xab, 0x7a, 0x99, 0x9e, 0x2b, 0x4f, 0xed, 0x5a, 0x7a, 0x5c, 0xbd, 0xf2, 0x32, 0x34, 0x02,
136     0x82, 0x4c, 0xb8, 0x11, 0x65, 0x22, 0x77, 0x42, 0x7f, 0xb1, 0x7b, 0x98, 0x1b, 0x82, 0x8f, 0xe7,
137     0x1f, 0x7b, 0x07, 0x21, 0x98, 0x60, 0xb4, 0x7b, 0xe2, 0x9a, 0xcb, 0xe9, 0xb3, 0x49, 0x35, 0x86,
138     0xea, 0x8b, 0x21, 0x46, 0xe9, 0x5b, 0x16, 0xe8, 0x2c, 0xe5, 0x9c, 0xb5, 0x96, 0x45, 0xce, 0x0c,
139     0x40, 0xbb, 0x97, 0x02, 0x03, 0x01, 0x00, 0x01, 0x02, 0x82, 0x02, 0x01, 0x00, 0x97, 0x36, 0x08,
140     0x37, 0xca, 0xe5, 0x01, 0x98, 0x6a, 0x7e, 0xfe, 0x66, 0x12, 0x21, 0x13, 0xae, 0x74, 0x68, 0xd2,
141     0x54, 0xb8, 0x26, 0x8d, 0x55, 0xd6, 0x2c, 0x1d, 0xfc, 0x12, 0xe5, 0x86, 0x32, 0x2a, 0xe5, 0x8b,
142     0x40, 0xe0, 0x34, 0xa1, 0xac, 0x7d, 0x16, 0x00, 0x25, 0x95, 0x98, 0xe9, 0xde, 0x45, 0xa8, 0x3c,
143     0x19, 0x6d, 0x32, 0x41, 0x76, 0x95, 0x79, 0x54, 0x10, 0x7e, 0x25, 0x18, 0x91, 0xd3, 0x03, 0x79,
144     0xd6, 0xfe, 0x32, 0xff, 0x60, 0xa2, 0x6c, 0x93, 0x2e, 0xff, 0x10, 0xff, 0x2e, 0x4c, 0x19, 0xc8,
145     0x78, 0x4c, 0x72, 0xd4, 0x1e, 0xca, 0x75, 0x0f, 0xa0, 0x1f, 0x11, 0x79, 0x18, 0xd8, 0x6e, 0xdc,
146     0x9d, 0xc8, 0xe2, 0x89, 0x12, 0x5f, 0xe8, 0x4d, 0xa2, 0x2a, 0x8a, 0xbc, 0x3a, 0xb3, 0xd5, 0x27,
147     0x63, 0xa8, 0xfe, 0x2e, 0x1b, 0x1f, 0xd7, 0x9a, 0x88, 0xb1, 0x01, 0xc8, 0x1d, 0x1e, 0x80, 0x6b,
148     0xba, 0xb1, 0xd7, 0x66, 0xfa, 0xbd, 0x39, 0xb4, 0x2a, 0xeb, 0xac, 0xbc, 0x51, 0x5e, 0xb4, 0x9e,
149     0x89, 0x7b, 0x48, 0x2c, 0xe1, 0x18, 0x5d, 0x27, 0x1a, 0xca, 0x41, 0x6b, 0x27, 0x6c, 0x8f, 0xd0,
150     0xcc, 0x31, 0xb5, 0x39, 0x8b, 0x11, 0x4c, 0x46, 0x85, 0x51, 0x5f, 0xe9, 0x10, 0x1d, 0x3e, 0x21,
151     0x54, 0xa6, 0x25, 0xd3, 0x7e, 0x93, 0x8d, 0x9b, 0x6d, 0x96, 0x68, 0x16, 0x5a, 0x3b, 0x5b, 0xe3,
152     0x22, 0x26, 0x1e, 0xdc, 0xaa, 0x09, 0x84, 0xcf, 0x46, 0x9c, 0xa8, 0x2e, 0x79, 0x6b, 0xe3, 0x51,
153     0x8f, 0x7e, 0x77, 0x72, 0xbe, 0xa0, 0x0e, 0x1e, 0x79, 0x1d, 0xe4, 0xb2, 0x60, 0xdd, 0x64, 0x3c,
154     0xea, 0xdd, 0x3c, 0xf1, 0xff, 0x21, 0xff, 0x91, 0x0b, 0x37, 0xb7, 0xcb, 0xe5, 0xd7, 0x8d, 0xf5,
155     0x09, 0x76, 0x5a, 0x1b, 0xd4, 0xf9, 0x25, 0xac, 0x0d, 0xac, 0x07, 0x81, 0xc3, 0xe6, 0x6c, 0x96,
156     0x4b, 0x6a, 0x8a, 0xf1, 0x31, 0xd6, 0x22, 0x0e, 0xf9, 0xb0, 0x5e, 0xb6, 0x69, 0x4d, 0xe9, 0xf0,
157     0xf2, 0xee, 0xe1, 0x13, 0x14, 0xa7, 0xff, 0x43, 0x53, 0x86, 0x15, 0x14, 0x5c, 0x89, 0x41, 0xb3,
158     0x1e, 0xaa, 0x6f, 0x96, 0x56, 0x9c, 0xe8, 0x59, 0xa3, 0x51, 0xad, 0x30, 0x59, 0xce, 0x47, 0xde,
159     0xdc, 0x6d, 0xd7, 0x0d, 0x9a, 0x29, 0xad, 0xd0, 0x61, 0xf5, 0xbc, 0x68, 0xb0, 0xa9, 0xc5, 0x23,
160     0x0d, 0xdf, 0x5e, 0xb4, 0x19, 0xd4, 0xc8, 0x84, 0x70, 0x05, 0x5b, 0x7c, 0x9b, 0xd5, 0x93, 0x39,
161     0x8a, 0xbe, 0xe8, 0x8f, 0x42, 0x0e, 0xdc, 0xdf, 0xb0, 0xb6, 0xdb, 0xc7, 0x85, 0xb0, 0xe3, 0x0b,
162     0x34, 0x9f, 0xfc, 0xf9, 0x8e, 0x53, 0x0e, 0x64, 0x1b, 0xb4, 0x41, 0xa6, 0xe0, 0x06, 0x64, 0x90,
163     0x82, 0x5d, 0x1c, 0x5a, 0x04, 0x14, 0xd8, 0x7e, 0x9c, 0x7f, 0x9d, 0x35, 0xc1, 0xeb, 0xb6, 0xf2,
164     0xfe, 0x96, 0x34, 0x75, 0xcd, 0xea, 0x39, 0xd3, 0xb7, 0x04, 0x12, 0x64, 0xd9, 0xc2, 0x1f, 0x17,
165     0x62, 0x37, 0x87, 0x08, 0x6b, 0xdc, 0x0b, 0xe0, 0x0b, 0x30, 0x55, 0x37, 0x14, 0x10, 0x3b, 0x60,
166     0x62, 0x53, 0xd5, 0x47, 0xd0, 0xc4, 0xab, 0xfc, 0xdc, 0xc2, 0x73, 0xff, 0x61, 0xa9, 0x75, 0xf4,
167     0x99, 0xa3, 0xcf, 0xae, 0xc8, 0xd7, 0xe0, 0x20, 0x8a, 0xc9, 0xda, 0xfe, 0x66, 0x00, 0x9b, 0x1d,
168     0x01, 0x54, 0x18, 0xbb, 0x6b, 0x41, 0xdb, 0x07, 0x84, 0x75, 0x9f, 0x33, 0x94, 0x85, 0xf5, 0x4c,
169     0xa9, 0xdf, 0x6d, 0x9e, 0xde, 0xe7, 0x7a, 0x45, 0x08, 0x1f, 0xc5, 0x22, 0x9d, 0x8d, 0x62, 0xef,
170     0x94, 0x46, 0x25, 0x5f, 0x40, 0x8f, 0x6f, 0x24, 0x65, 0x57, 0xfa, 0x0c, 0x1d, 0x1b, 0xa9, 0xd1,
171     0x93, 0x00, 0x40, 0xc3, 0xed, 0xd5, 0x7f, 0x8c, 0x98, 0xb2, 0xd4, 0xf3, 0x19, 0x02, 0x82, 0x01,
172     0x01, 0x00, 0xea, 0xae, 0x2b, 0x8b, 0x8f, 0x87, 0x2b, 0xe4, 0x10, 0x20, 0x50, 0xad, 0x1b, 0x81,
173     0xdc, 0x4a, 0xfb, 0x38, 0xdb, 0x8e, 0x87, 0x82, 0x21, 0x7e, 0x18, 0xb9, 0xc8, 0xee, 0x04, 0x7c,
174     0xdb, 0xad, 0x3d, 0xa4, 0xb1, 0x27, 0xc5, 0xd4, 0xa6, 0xbe, 0x14, 0x8c, 0x55, 0x7d, 0x39, 0x03,
175     0x6c, 0xe9, 0xb0, 0x25, 0xc4, 0x2a, 0xc0, 0xab, 0x98, 0xe9, 0xf8, 0x6c, 0x6b, 0x75, 0x51, 0xc2,
176     0xcc, 0x44, 0x53, 0x92, 0x7a, 0x17, 0xda, 0xad, 0x6d, 0x5a, 0x55, 0x7c, 0xfd, 0x2d, 0x85, 0xa2,
177     0xa4, 0xb0, 0xc0, 0x4d, 0xf0, 0xde, 0xca, 0xe1, 0xe1, 0xd4, 0x76, 0xd6, 0xfe, 0xb0, 0xb6, 0xac,
178     0x36, 0x6a, 0xf3, 0x0c, 0xe0, 0xa0, 0x9c, 0xbd, 0xd7, 0x46, 0x82, 0xe7, 0x32, 0x73, 0x58, 0x34,
179     0x75, 0xeb, 0x83, 0xc9, 0x3d, 0x8e, 0xf7, 0x76, 0xe1, 0xa9, 0x0e, 0xb9, 0x07, 0x87, 0x0c, 0x37,
180     0xeb, 0x22, 0xe3, 0x55, 0x7b, 0xf9, 0x24, 0xf6, 0x0e, 0xe7, 0x4f, 0x88, 0x83, 0x12, 0xf1, 0xec,
181     0xa9, 0xf7, 0xf7, 0xf5, 0xf4, 0x53, 0x71, 0xa2, 0x9a, 0x2d, 0xc4, 0x5b, 0x52, 0x28, 0x47, 0xdf,
182     0x19, 0x1e, 0x47, 0x7c, 0x3c, 0x82, 0x37, 0x46, 0xeb, 0xce, 0x8c, 0x3c, 0x41, 0x08, 0x76, 0x16,
183     0x46, 0x5b, 0x23, 0x6c, 0x77, 0xd4, 0x6a, 0xae, 0xd6, 0x8f, 0x34, 0x6a, 0x9f, 0x17, 0xa2, 0xb5,
184     0xeb, 0x5e, 0x4c, 0x7c, 0x5e, 0xe1, 0x73, 0xb5, 0x75, 0x39, 0xa9, 0x0b, 0x3f, 0xf6, 0xdc, 0xb3,
185     0x3d, 0x2e, 0x70, 0x4b, 0x32, 0x19, 0x38, 0x48, 0xe7, 0x57, 0x47, 0xee, 0xee, 0x99, 0xde, 0x33,
186     0x0c, 0xc1, 0xe6, 0xcb, 0x45, 0x51, 0xb3, 0xbe, 0x69, 0x35, 0xe6, 0xc0, 0x11, 0x03, 0x74, 0xd3,
187     0x24, 0x76, 0x14, 0x82, 0x31, 0x3e, 0xe3, 0x86, 0x52, 0x13, 0x26, 0xe0, 0x0e, 0x46, 0x5a, 0x84,
188     0x98, 0xf3, 0x02, 0x82, 0x01, 0x01, 0x00, 0xdc, 0xf8, 0xef, 0x30, 0x44, 0xb8, 0x35, 0xee, 0xe0,
189     0x97, 0x4e, 0x11, 0x4a, 0xab, 0x1b, 0xfa, 0x33, 0x18, 0x3d, 0xc1, 0x3a, 0x48, 0x8f, 0x4c, 0x1f,
190     0x81, 0xf9, 0x16, 0x42, 0x73, 0x8b, 0x37, 0x01, 0xc1, 0x49, 0xb9, 0xb9, 0x72, 0x90, 0x16, 0x0a,
191     0x64, 0x0f, 0xd6, 0x18, 0x5e, 0xe6, 0x4f, 0x2d, 0x96, 0xe5, 0xfe, 0x1b, 0x29, 0xff, 0xef, 0xc5,
192     0x91, 0x56, 0x09, 0xfd, 0x78, 0xd9, 0xa1, 0x04, 0xe4, 0xcb, 0xfb, 0x74, 0xac, 0x43, 0x20, 0x7f,
193     0xd4, 0x1f, 0xb2, 0x63, 0x6a, 0x22, 0xc0, 0x56, 0xe3, 0x3c, 0x05, 0xdd, 0x64, 0xcc, 0x13, 0x37,
194     0xab, 0xaa, 0xea, 0xbf, 0x89, 0x61, 0x39, 0xc4, 0x5b, 0x4c, 0xbd, 0xae, 0xcb, 0x53, 0xdf, 0x92,
195     0x7c, 0x48, 0x57, 0x33, 0x4f, 0x9f, 0xb2, 0xae, 0x35, 0xba, 0x87, 0x35, 0x88, 0x2f, 0xe3, 0xb0,
196     0x87, 0xef, 0xf3, 0xc1, 0x8f, 0xc2, 0x9a, 0x72, 0x9f, 0x11, 0xa9, 0x95, 0x00, 0x14, 0xc8, 0xcc,
197     0x62, 0x50, 0x7f, 0xb2, 0x23, 0xf8, 0x8b, 0x41, 0xb2, 0x31, 0x70, 0xd2, 0x75, 0x4d, 0x54, 0xf4,
198     0x88, 0x28, 0x47, 0x68, 0x3f, 0x01, 0x12, 0x8d, 0x58, 0xab, 0x9c, 0x5f, 0xd1, 0xe8, 0xf1, 0x8f,
199     0xb9, 0x15, 0x8c, 0xfb, 0xac, 0x77, 0xd0, 0xe5, 0x03, 0xf4, 0x9a, 0x4e, 0x26, 0x7c, 0xb3, 0xca,
200     0x99, 0x10, 0x5f, 0x6f, 0x21, 0x51, 0x4e, 0xff, 0x74, 0x30, 0x13, 0x1a, 0x3e, 0x28, 0xb1, 0xe0,
201     0x55, 0xfc, 0xab, 0xb6, 0xa5, 0xc5, 0x97, 0xb2, 0xa4, 0x9d, 0x0c, 0x3b, 0xaa, 0xf6, 0xd9, 0x66,
202     0xea, 0x5f, 0xa1, 0x37, 0x23, 0xb0, 0x3d, 0x03, 0x94, 0xaf, 0x8c, 0xc3, 0x03, 0xd4, 0xc9, 0x1e,
203     0x30, 0x63, 0x59, 0x57, 0x82, 0x65, 0xf2, 0x1e, 0xb2, 0x37, 0xd3, 0xbf, 0xbe, 0xa6, 0xed, 0x6b,
204     0x9f, 0x7d, 0x64, 0xc0, 0x74, 0xfb, 0xcd, 0x02, 0x82, 0x01, 0x01, 0x00, 0x98, 0x99, 0x6e, 0x99,
205     0x4e, 0x58, 0x0f, 0xf3, 0x39, 0x85, 0x39, 0xd0, 0x86, 0x7d, 0x77, 0xb8, 0x8e, 0x09, 0x17, 0xc3,
206     0x63, 0x5b, 0xfb, 0xd9, 0x59, 0xcc, 0x9c, 0xda, 0x20, 0xb2, 0xeb, 0xc9, 0x87, 0xb6, 0xea, 0xb7,
207     0x39, 0x0d, 0xa0, 0xeb, 0x22, 0xc3, 0x69, 0xe7, 0x86, 0x46, 0x32, 0xf0, 0xf5, 0xe8, 0x68, 0xd9,
208     0x7f, 0xf5, 0x54, 0xf6, 0x76, 0xe2, 0x51, 0x31, 0xb5, 0x5b, 0x9c, 0xa5, 0xa5, 0x4e, 0x2e, 0xf4,
209     0x09, 0xef, 0x11, 0x97, 0x56, 0xd5, 0x72, 0x6f, 0xc2, 0x60, 0xd3, 0x04, 0x57, 0xd7, 0x96, 0x93,
210     0xd8, 0x8a, 0xee, 0xe4, 0xcf, 0xed, 0xd7, 0x29, 0x23, 0x6f, 0x71, 0xe7, 0x33, 0x6a, 0x21, 0x3a,
211     0x6f, 0x11, 0x86, 0xc5, 0x43, 0xe3, 0x80, 0x4b, 0xbe, 0x84, 0x46, 0x55, 0x41, 0x99, 0x7e, 0xdc,
212     0xd3, 0x0f, 0x4b, 0x87, 0x39, 0x9a, 0x99, 0x49, 0x78, 0x69, 0x78, 0x0d, 0x74, 0x93, 0xa6, 0x8c,
213     0x88, 0x3b, 0x33, 0xcf, 0xb7, 0x48, 0xc6, 0x2a, 0x70, 0x83, 0x7a, 0xb6, 0x52, 0x57, 0x6d, 0x6b,
214     0x41, 0x0e, 0x01, 0x81, 0x57, 0x18, 0x26, 0xa1, 0x28, 0xb2, 0xea, 0x4b, 0x65, 0x22, 0x64, 0xda,
215     0x2b, 0x85, 0x83, 0x5a, 0x08, 0x98, 0x39, 0x95, 0x7d, 0xeb, 0xd8, 0x0d, 0xf5, 0x47, 0xd7, 0xd7,
216     0x99, 0x13, 0x5d, 0x53, 0x3b, 0x3b, 0x45, 0x7e, 0x02, 0x00, 0x97, 0x2e, 0xf7, 0x3f, 0x3c, 0x17,
217     0x0f, 0xbd, 0x63, 0x9f, 0x7d, 0xcb, 0x61, 0xe9, 0x6c, 0xf3, 0x64, 0x0a, 0x29, 0x5c, 0xcc, 0x13,
218     0xd8, 0x24, 0x97, 0xc1, 0x8a, 0x75, 0xd4, 0x52, 0xdb, 0x48, 0x88, 0xb8, 0x21, 0x11, 0xf6, 0x5e,
219     0x3d, 0x29, 0xc8, 0x92, 0x13, 0x1c, 0xbb, 0x33, 0x6b, 0x28, 0xcc, 0xa1, 0xb7, 0x8e, 0x3c, 0xe5,
220     0x6e, 0xdf, 0x6d, 0xc9, 0x24, 0x53, 0x37, 0x15, 0x0a, 0x51, 0x04, 0x7f, 0x02, 0x82, 0x01, 0x00,
221     0x19, 0xad, 0xd4, 0x1e, 0x07, 0xde, 0x60, 0x66, 0x22, 0x33, 0x73, 0x1f, 0x0f, 0x4e, 0x53, 0x32,
222     0x00, 0x3e, 0x10, 0xef, 0x23, 0x96, 0xcb, 0x10, 0x4d, 0x99, 0x0d, 0x19, 0x49, 0x1f, 0xa4, 0x4e,
223     0x00, 0x26, 0x36, 0x2b, 0x1f, 0x21, 0xf1, 0x1c, 0x9e, 0x98, 0x82, 0x3e, 0x9f, 0x16, 0x68, 0x2d,
224     0x4b, 0x5e, 0xfd, 0xdb, 0x49, 0xcc, 0xd7, 0xb1, 0x45, 0x84, 0x5e, 0x3b, 0x4a, 0xf9, 0x80, 0x50,
225     0xf6, 0x00, 0xa0, 0xb3, 0xd8, 0x1b, 0x2c, 0xb1, 0xda, 0x29, 0x0c, 0x85, 0xee, 0x87, 0xa7, 0x02,
226     0x33, 0x16, 0xb5, 0x22, 0xf9, 0x57, 0x7d, 0x5f, 0xbe, 0x58, 0x74, 0xc4, 0x52, 0xfd, 0xe4, 0x0e,
227     0x92, 0x83, 0x09, 0xa8, 0x01, 0x68, 0x1f, 0x97, 0x1b, 0xae, 0xd5, 0xb9, 0x4c, 0x7d, 0x34, 0x51,
228     0xcf, 0x6c, 0xef, 0x00, 0x47, 0x78, 0x4c, 0x18, 0x69, 0xab, 0x62, 0x77, 0x31, 0x47, 0x43, 0x96,
229     0x2f, 0x3b, 0xcd, 0x11, 0xa7, 0xff, 0x1a, 0x6b, 0x3b, 0x55, 0x31, 0x85, 0xa5, 0x6e, 0x08, 0xb4,
230     0x26, 0x2e, 0x4f, 0x10, 0x8d, 0x64, 0x94, 0x58, 0x0b, 0x12, 0xc7, 0x9b, 0x84, 0xc1, 0xcd, 0x9e,
231     0x1a, 0x4e, 0xf3, 0xa2, 0x78, 0x80, 0x2c, 0x51, 0xe6, 0x21, 0xdc, 0x1f, 0x46, 0x20, 0x04, 0xcc,
232     0x81, 0xd0, 0xb3, 0xdc, 0x3a, 0xb8, 0xbe, 0x45, 0x26, 0x86, 0x23, 0x20, 0xf4, 0x09, 0x2b, 0x29,
233     0xc3, 0x05, 0xfd, 0x90, 0x3a, 0xbc, 0x7e, 0x7e, 0x2d, 0x53, 0xd0, 0xc9, 0x23, 0xb0, 0xa0, 0x05,
234     0xc0, 0xfc, 0xe0, 0x43, 0x4b, 0xab, 0xd2, 0x83, 0xf1, 0x31, 0xcb, 0x6b, 0x30, 0xbd, 0x34, 0xfd,
235     0xe2, 0x2c, 0xa5, 0x39, 0xf6, 0x6f, 0xbb, 0x8a, 0xa3, 0xb7, 0x7b, 0xd4, 0x26, 0x17, 0x41, 0x41,
236     0xa1, 0xcf, 0x94, 0x2d, 0x47, 0x5b, 0x20, 0x8a, 0xf6, 0xb6, 0xd2, 0x1b, 0xa3, 0x41, 0xf5, 0x01,
237     0x02, 0x82, 0x01, 0x01, 0x00, 0x83, 0xca, 0xca, 0xea, 0xa4, 0xdf, 0xc1, 0x0b, 0xe9, 0xcf, 0xca,
238     0x88, 0xbe, 0x3b, 0xe8, 0x9b, 0x3c, 0xa3, 0xd1, 0x73, 0x15, 0x13, 0x47, 0xfb, 0xbe, 0x64, 0xbf,
239     0x91, 0x6d, 0x26, 0xf6, 0xfc, 0x05, 0x77, 0x0b, 0x1f, 0x95, 0x14, 0x74, 0x02, 0x75, 0xe5, 0x1d,
240     0xf3, 0x31, 0x24, 0xd1, 0x3b, 0x8e, 0x97, 0xdb, 0xe8, 0xaa, 0xa0, 0xc8, 0xe4, 0x72, 0xda, 0x6a,
241     0xf6, 0x42, 0x95, 0xcf, 0x55, 0x4f, 0x80, 0x3d, 0xb5, 0xea, 0x7b, 0x45, 0x15, 0x08, 0xde, 0xda,
242     0xd4, 0xe6, 0x1e, 0xdb, 0x4f, 0x3d, 0x20, 0x73, 0xa6, 0x88, 0x4e, 0x63, 0x42, 0x79, 0xd3, 0xbb,
243     0xea, 0xac, 0x75, 0x70, 0xbd, 0x4b, 0xc5, 0x97, 0x9e, 0xd9, 0x33, 0x12, 0x1a, 0xe1, 0xab, 0xba,
244     0xd7, 0xa9, 0x48, 0xfd, 0xc9, 0x85, 0x41, 0x6b, 0x36, 0x4f, 0xbc, 0x64, 0xf7, 0xc3, 0x6d, 0x94,
245     0x57, 0x22, 0x1d, 0x65, 0x36, 0x70, 0xe6, 0x48, 0x47, 0xf9, 0xdb, 0x94, 0x06, 0x91, 0xec, 0x03,
246     0x0a, 0x16, 0xe9, 0xbd, 0x94, 0x2a, 0x1f, 0x78, 0xd5, 0x70, 0x64, 0x40, 0xb3, 0x7f, 0xa6, 0xc2,
247     0x89, 0x9c, 0xed, 0x76, 0xe2, 0x16, 0x29, 0x64, 0x41, 0xd6, 0x37, 0x11, 0x59, 0x23, 0x64, 0x84,
248     0x85, 0x6e, 0x88, 0x0e, 0x4e, 0xd5, 0xc2, 0x5a, 0x70, 0x11, 0x66, 0x22, 0x6a, 0x2e, 0x46, 0x10,
249     0x28, 0x01, 0xd7, 0xe8, 0xfb, 0xb4, 0xdb, 0xf2, 0xfd, 0x35, 0xef, 0x85, 0x42, 0xd2, 0xa2, 0x30,
250     0xa3, 0x38, 0xc9, 0x66, 0x9b, 0x9d, 0x71, 0x6c, 0xa5, 0xac, 0x6e, 0x50, 0x7c, 0x0d, 0xb5, 0x7f,
251     0x50, 0x9f, 0x0d, 0x28, 0x65, 0x69, 0x9b, 0x97, 0x07, 0x97, 0xf4, 0x47, 0x49, 0xd8, 0x78, 0xc4,
252     0x57, 0xff, 0xae, 0x32, 0xb1, 0xcd, 0x7b, 0xb5, 0x99, 0x6c, 0x4a, 0xc0, 0x40, 0x6d, 0x0b, 0x64,
253     0x78, 0x37, 0x1b, 0x47, 0x83};
254 
255 static const uint8_t kRSACACertDER[] = {0x30, 0x82, 0x04, 0x11, 0x30, 0x82, 0x02, 0xf9, 0xa0, 0x03,
256     0x02, 0x01, 0x02, 0x02, 0x09, 0x00, 0xac, 0x5d, 0x53, 0x88, 0x67, 0x97, 0x39, 0x87, 0x30, 0x0d,
257     0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30, 0x81, 0x9e,
258     0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x41, 0x55, 0x31, 0x0b, 0x30,
259     0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x02, 0x4e, 0x53, 0x31, 0x21, 0x30, 0x1f, 0x06, 0x03,
260     0x55, 0x04, 0x0a, 0x0c, 0x18, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x20, 0x57, 0x69,
261     0x64, 0x67, 0x69, 0x74, 0x73, 0x20, 0x50, 0x74, 0x79, 0x20, 0x4c, 0x74, 0x64, 0x31, 0x0b, 0x30,
262     0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x41, 0x41, 0x31, 0x19, 0x30, 0x17, 0x06, 0x03,
263     0x55, 0x04, 0x03, 0x0c, 0x10, 0x77, 0x77, 0x77, 0x2e, 0x6e, 0x6f, 0x6e, 0x65, 0x78, 0x69, 0x73,
264     0x74, 0x65, 0x6e, 0x74, 0x33, 0x31, 0x37, 0x30, 0x35, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7,
265     0x0d, 0x01, 0x09, 0x01, 0x16, 0x28, 0x6e, 0x6f, 0x6e, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65, 0x6e,
266     0x74, 0x33, 0x40, 0x6e, 0x6f, 0x6e, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x63,
267     0x6f, 0x6d, 0x2e, 0x6e, 0x6f, 0x6e, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x30, 0x1e,
268     0x17, 0x0d, 0x31, 0x36, 0x31, 0x31, 0x31, 0x38, 0x32, 0x32, 0x34, 0x34, 0x34, 0x39, 0x5a, 0x17,
269     0x0d, 0x31, 0x39, 0x31, 0x31, 0x31, 0x38, 0x32, 0x32, 0x34, 0x34, 0x34, 0x39, 0x5a, 0x30, 0x81,
270     0x9e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x41, 0x55, 0x31, 0x0b,
271     0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x02, 0x4e, 0x53, 0x31, 0x21, 0x30, 0x1f, 0x06,
272     0x03, 0x55, 0x04, 0x0a, 0x0c, 0x18, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x20, 0x57,
273     0x69, 0x64, 0x67, 0x69, 0x74, 0x73, 0x20, 0x50, 0x74, 0x79, 0x20, 0x4c, 0x74, 0x64, 0x31, 0x0b,
274     0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x41, 0x41, 0x31, 0x19, 0x30, 0x17, 0x06,
275     0x03, 0x55, 0x04, 0x03, 0x0c, 0x10, 0x77, 0x77, 0x77, 0x2e, 0x6e, 0x6f, 0x6e, 0x65, 0x78, 0x69,
276     0x73, 0x74, 0x65, 0x6e, 0x74, 0x33, 0x31, 0x37, 0x30, 0x35, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86,
277     0xf7, 0x0d, 0x01, 0x09, 0x01, 0x16, 0x28, 0x6e, 0x6f, 0x6e, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65,
278     0x6e, 0x74, 0x33, 0x40, 0x6e, 0x6f, 0x6e, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x2e,
279     0x63, 0x6f, 0x6d, 0x2e, 0x6e, 0x6f, 0x6e, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x30,
280     0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
281     0x05, 0x00, 0x03, 0x82, 0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00,
282     0xd6, 0x49, 0x39, 0xb9, 0xfd, 0x02, 0xe4, 0xf7, 0x0b, 0x98, 0x14, 0x51, 0xbc, 0xc2, 0xb0, 0x0b,
283     0xd6, 0x09, 0xf0, 0x12, 0xd5, 0xe4, 0x6a, 0x80, 0x10, 0x49, 0x54, 0x71, 0xa7, 0x75, 0x3f, 0x4b,
284     0x18, 0xb4, 0xb8, 0xef, 0xe1, 0xb4, 0x03, 0x55, 0xa4, 0xcf, 0x09, 0x24, 0x03, 0x0a, 0xf2, 0x34,
285     0xa5, 0xbc, 0xaa, 0x8e, 0x72, 0x39, 0x9c, 0xfe, 0x7a, 0x16, 0x44, 0x18, 0x7a, 0xbb, 0x56, 0x4f,
286     0x7a, 0xef, 0x93, 0x7f, 0x91, 0x98, 0x53, 0xe2, 0xd3, 0xc9, 0x5e, 0x20, 0x4a, 0x91, 0xf5, 0x8b,
287     0x51, 0x9d, 0x36, 0x15, 0x20, 0x7b, 0x0b, 0xd1, 0x41, 0xac, 0x0e, 0xbd, 0x14, 0x09, 0x69, 0xf3,
288     0xb8, 0x9f, 0x9f, 0x65, 0x2b, 0x26, 0xae, 0xb9, 0x6b, 0x09, 0x45, 0x7c, 0x55, 0xe0, 0xb5, 0x87,
289     0x60, 0x14, 0xd2, 0xaf, 0x93, 0x2b, 0x31, 0x90, 0x7b, 0xe9, 0x7c, 0x2a, 0x04, 0xd7, 0xb6, 0x72,
290     0x27, 0xd2, 0xf9, 0x88, 0x27, 0xb7, 0x66, 0xc9, 0xd2, 0x58, 0xff, 0x65, 0x68, 0x0a, 0x7a, 0x31,
291     0xc9, 0x99, 0x0d, 0xd1, 0x0c, 0x42, 0x46, 0xbd, 0xd0, 0x8e, 0xfa, 0xfa, 0x90, 0x50, 0xee, 0x47,
292     0x8b, 0xf0, 0xc4, 0x5f, 0x9d, 0xf4, 0x58, 0x7b, 0x53, 0x0d, 0xfb, 0x9d, 0x60, 0xde, 0x0e, 0x54,
293     0x9b, 0xef, 0xac, 0xcf, 0xce, 0x50, 0xda, 0xfe, 0xf6, 0x95, 0xd0, 0x70, 0xf2, 0xeb, 0xb6, 0x90,
294     0x15, 0xc9, 0xe6, 0xf0, 0x3d, 0xb0, 0x14, 0x03, 0xc3, 0xa1, 0xc6, 0x9a, 0x5d, 0x5d, 0x70, 0x8f,
295     0xfe, 0xd2, 0x8c, 0xac, 0x8d, 0xa7, 0x0d, 0x1e, 0x8f, 0x40, 0xf8, 0xff, 0x8c, 0x06, 0x23, 0xe0,
296     0xc5, 0x28, 0x67, 0x54, 0xd2, 0xf3, 0xa0, 0x25, 0x74, 0xd0, 0xe5, 0x5f, 0x44, 0x11, 0x42, 0xc5,
297     0x33, 0x4e, 0x58, 0xe6, 0xf2, 0x64, 0x5f, 0xf4, 0x41, 0x07, 0xaa, 0x06, 0x42, 0xc8, 0x49, 0xff,
298     0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, 0x50, 0x30, 0x4e, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e,
299     0x04, 0x16, 0x04, 0x14, 0xd7, 0xde, 0xbb, 0xad, 0x37, 0xb6, 0x45, 0x6d, 0x71, 0x0d, 0xd4, 0xb3,
300     0x59, 0x7c, 0x7f, 0xcd, 0xbb, 0xc1, 0xa5, 0x50, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04,
301     0x18, 0x30, 0x16, 0x80, 0x14, 0xd7, 0xde, 0xbb, 0xad, 0x37, 0xb6, 0x45, 0x6d, 0x71, 0x0d, 0xd4,
302     0xb3, 0x59, 0x7c, 0x7f, 0xcd, 0xbb, 0xc1, 0xa5, 0x50, 0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13,
303     0x04, 0x05, 0x30, 0x03, 0x01, 0x01, 0xff, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7,
304     0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x82, 0x01, 0x01, 0x00, 0x34, 0x8c, 0xa8, 0x0d, 0xf8,
305     0xb8, 0x9e, 0xa7, 0xd5, 0xb5, 0x8c, 0xf5, 0x5d, 0x7e, 0x4e, 0x37, 0x8a, 0xb0, 0xed, 0x8d, 0x22,
306     0xa0, 0xe4, 0x36, 0x87, 0xaa, 0x91, 0xc6, 0xcd, 0xae, 0x99, 0x39, 0xd6, 0xc8, 0xa2, 0x61, 0x4f,
307     0x18, 0xc7, 0x16, 0xd8, 0x3f, 0x48, 0x71, 0xe7, 0x14, 0x5b, 0x99, 0x04, 0xe5, 0x04, 0x17, 0x41,
308     0x98, 0x68, 0x24, 0x8b, 0xab, 0x03, 0x91, 0xcd, 0xfa, 0x54, 0xc9, 0xeb, 0x97, 0x25, 0x69, 0x34,
309     0xcd, 0x30, 0x6c, 0xb9, 0x86, 0xea, 0x5c, 0xf6, 0x0f, 0xcf, 0x02, 0x8d, 0xe4, 0xf6, 0xeb, 0x0a,
310     0xf3, 0x0d, 0x96, 0x27, 0x30, 0x16, 0x2c, 0x33, 0x9c, 0x16, 0x3d, 0xad, 0x1c, 0x9f, 0xc0, 0x76,
311     0xb3, 0xcb, 0x1e, 0xe3, 0x4b, 0x69, 0x42, 0x22, 0x82, 0x35, 0x16, 0x7d, 0x90, 0xd3, 0x36, 0x63,
312     0xba, 0x0d, 0xd8, 0x26, 0xf8, 0xe4, 0xf3, 0x4d, 0x2f, 0x2d, 0xcf, 0x2b, 0xc6, 0xa5, 0x08, 0xc5,
313     0xb5, 0xa2, 0x02, 0x94, 0xc8, 0x11, 0xd4, 0x93, 0x1b, 0x2e, 0xae, 0x38, 0x80, 0x4b, 0x47, 0x21,
314     0x24, 0x17, 0x36, 0x1c, 0xd3, 0x6b, 0xfe, 0x52, 0x33, 0xff, 0x19, 0x5c, 0xa5, 0x24, 0x79, 0x10,
315     0x26, 0xc7, 0x79, 0x6e, 0xc5, 0xb6, 0x02, 0x58, 0xdc, 0x00, 0x55, 0x0b, 0xf3, 0xb3, 0x63, 0x61,
316     0x82, 0xf2, 0xd4, 0xe3, 0xf2, 0x5f, 0x39, 0xc4, 0x02, 0x58, 0x4d, 0x42, 0x09, 0x01, 0xa1, 0x56,
317     0x30, 0x9f, 0x9e, 0x79, 0x21, 0xc6, 0xfe, 0x47, 0x31, 0x95, 0xbb, 0x31, 0x4c, 0x52, 0xdb, 0x1f,
318     0xe7, 0xfa, 0xbf, 0x71, 0x5d, 0x5b, 0xd4, 0x37, 0xbc, 0xbd, 0x7b, 0x85, 0x08, 0x65, 0x06, 0x59,
319     0xf6, 0xb2, 0x09, 0x82, 0x0d, 0xce, 0x5a, 0xae, 0xf5, 0x1d, 0xb0, 0x2e, 0x15, 0xd5, 0x8c, 0xbb,
320     0xca, 0x4b, 0x4c, 0x27, 0x01, 0x12, 0x8b, 0xe9, 0xfd, 0x61, 0xed};
321 
322 static const uint8_t kECCACertDER[] = {0x30, 0x82, 0x02, 0x6e, 0x30, 0x82, 0x02, 0x15, 0xa0, 0x03,
323     0x02, 0x01, 0x02, 0x02, 0x09, 0x00, 0xf7, 0x16, 0x78, 0x5d, 0xe9, 0x0d, 0xc6, 0x8e, 0x30, 0x0a,
324     0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x81, 0x93, 0x31, 0x0b, 0x30,
325     0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x41, 0x55, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x03,
326     0x55, 0x04, 0x08, 0x0c, 0x06, 0x53, 0x79, 0x64, 0x6e, 0x65, 0x79, 0x31, 0x21, 0x30, 0x1f, 0x06,
327     0x03, 0x55, 0x04, 0x0a, 0x0c, 0x18, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x20, 0x57,
328     0x69, 0x64, 0x67, 0x69, 0x74, 0x73, 0x20, 0x50, 0x74, 0x79, 0x20, 0x4c, 0x74, 0x64, 0x31, 0x0c,
329     0x30, 0x0a, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x03, 0x73, 0x61, 0x64, 0x31, 0x14, 0x30, 0x12,
330     0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x0b, 0x6e, 0x6f, 0x6e, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e,
331     0x34, 0x34, 0x31, 0x2c, 0x30, 0x2a, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x09,
332     0x01, 0x16, 0x1d, 0x6e, 0x6f, 0x6e, 0x40, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x2e,
333     0x6e, 0x6f, 0x6e, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x34, 0x33, 0x34, 0x33, 0x32,
334     0x30, 0x1e, 0x17, 0x0d, 0x31, 0x36, 0x31, 0x32, 0x30, 0x33, 0x30, 0x34, 0x30, 0x36, 0x35, 0x38,
335     0x5a, 0x17, 0x0d, 0x31, 0x39, 0x31, 0x32, 0x30, 0x33, 0x30, 0x34, 0x30, 0x36, 0x35, 0x38, 0x5a,
336     0x30, 0x81, 0x93, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x41, 0x55,
337     0x31, 0x0f, 0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x06, 0x53, 0x79, 0x64, 0x6e, 0x65,
338     0x79, 0x31, 0x21, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x18, 0x49, 0x6e, 0x74, 0x65,
339     0x72, 0x6e, 0x65, 0x74, 0x20, 0x57, 0x69, 0x64, 0x67, 0x69, 0x74, 0x73, 0x20, 0x50, 0x74, 0x79,
340     0x20, 0x4c, 0x74, 0x64, 0x31, 0x0c, 0x30, 0x0a, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x03, 0x73,
341     0x61, 0x64, 0x31, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x0b, 0x6e, 0x6f, 0x6e,
342     0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x34, 0x34, 0x31, 0x2c, 0x30, 0x2a, 0x06, 0x09, 0x2a, 0x86,
343     0x48, 0x86, 0xf7, 0x0d, 0x01, 0x09, 0x01, 0x16, 0x1d, 0x6e, 0x6f, 0x6e, 0x40, 0x65, 0x78, 0x69,
344     0x73, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x6e, 0x6f, 0x6e, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65, 0x6e,
345     0x74, 0x34, 0x33, 0x34, 0x33, 0x32, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce,
346     0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00,
347     0x04, 0x68, 0x63, 0xa8, 0xd1, 0x25, 0xc8, 0x1e, 0x07, 0x24, 0x62, 0x37, 0xd4, 0x03, 0xac, 0xa8,
348     0xa7, 0x6e, 0x90, 0x02, 0x99, 0xcf, 0x29, 0xeb, 0x4c, 0x40, 0x59, 0xb6, 0x7e, 0x3f, 0x12, 0xe5,
349     0x1f, 0x52, 0xca, 0x0b, 0x10, 0x7d, 0xd5, 0xaa, 0x51, 0x8d, 0xd3, 0x50, 0x94, 0x7f, 0x9e, 0x2f,
350     0x16, 0x79, 0x37, 0x5b, 0x47, 0x9b, 0xbe, 0xf4, 0xaf, 0xe2, 0x9a, 0x9b, 0x15, 0x31, 0x0c, 0xc6,
351     0x61, 0xa3, 0x50, 0x30, 0x4e, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14,
352     0x49, 0xdb, 0xfd, 0x0c, 0x73, 0x69, 0x83, 0x7f, 0xc1, 0xc1, 0xc2, 0x3f, 0xce, 0x4e, 0x82, 0xe6,
353     0xd3, 0xdc, 0x3c, 0x6e, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80,
354     0x14, 0x49, 0xdb, 0xfd, 0x0c, 0x73, 0x69, 0x83, 0x7f, 0xc1, 0xc1, 0xc2, 0x3f, 0xce, 0x4e, 0x82,
355     0xe6, 0xd3, 0xdc, 0x3c, 0x6e, 0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x04, 0x05, 0x30, 0x03,
356     0x01, 0x01, 0xff, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03,
357     0x47, 0x00, 0x30, 0x44, 0x02, 0x20, 0x0e, 0x49, 0x30, 0xc0, 0x3f, 0x41, 0xcd, 0xc7, 0x87, 0xe7,
358     0x0f, 0xfd, 0x2a, 0xcd, 0xd8, 0x9c, 0xf8, 0x1c, 0x8f, 0xbc, 0x94, 0xab, 0x29, 0xcd, 0xaf, 0x7e,
359     0xf1, 0x94, 0x28, 0x25, 0x1d, 0xc1, 0x02, 0x20, 0x29, 0x93, 0xf3, 0x91, 0x44, 0xe3, 0xac, 0xfe,
360     0xc5, 0x86, 0xdd, 0x27, 0x36, 0x49, 0xd6, 0x61, 0x72, 0x47, 0x1b, 0x55, 0x46, 0x29, 0x50, 0x2a,
361     0x16, 0xf3, 0x60, 0x2e, 0x3f, 0x96, 0x8d, 0x9a};
362 
363 static const uint8_t kDSACertDER[] = {0x30, 0x82, 0x04, 0x1d, 0x30, 0x82, 0x03, 0xdb, 0xa0, 0x03,
364     0x02, 0x01, 0x02, 0x02, 0x09, 0x00, 0xcc, 0x5e, 0x3b, 0x1d, 0xfd, 0xc4, 0x05, 0x9b, 0x30, 0x0b,
365     0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x02, 0x30, 0x81, 0xc6, 0x31, 0x0b,
366     0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x41, 0x55, 0x31, 0x0c, 0x30, 0x0a, 0x06,
367     0x03, 0x55, 0x04, 0x08, 0x0c, 0x03, 0x4e, 0x53, 0x57, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x03, 0x55,
368     0x04, 0x07, 0x0c, 0x06, 0x53, 0x79, 0x64, 0x6e, 0x65, 0x79, 0x31, 0x21, 0x30, 0x1f, 0x06, 0x03,
369     0x55, 0x04, 0x0a, 0x0c, 0x18, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x20, 0x57, 0x69,
370     0x64, 0x67, 0x69, 0x74, 0x73, 0x20, 0x50, 0x74, 0x79, 0x20, 0x4c, 0x74, 0x64, 0x31, 0x0b, 0x30,
371     0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x4f, 0x55, 0x31, 0x2a, 0x30, 0x28, 0x06, 0x03,
372     0x55, 0x04, 0x03, 0x0c, 0x21, 0x6e, 0x6f, 0x6e, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74,
373     0x2e, 0x61, 0x75, 0x73, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x61, 0x2e, 0x6e, 0x6f, 0x6e, 0x65, 0x78,
374     0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x31, 0x3c, 0x30, 0x3a, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86,
375     0xf7, 0x0d, 0x01, 0x09, 0x01, 0x16, 0x2d, 0x6e, 0x6f, 0x6e, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65,
376     0x6e, 0x74, 0x40, 0x6e, 0x6f, 0x6e, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x61,
377     0x75, 0x73, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x61, 0x2e, 0x6e, 0x6f, 0x6e, 0x65, 0x78, 0x69, 0x73,
378     0x74, 0x65, 0x6e, 0x74, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x37, 0x30, 0x32, 0x32, 0x30, 0x32, 0x30,
379     0x34, 0x32, 0x34, 0x30, 0x5a, 0x17, 0x0d, 0x31, 0x37, 0x30, 0x33, 0x32, 0x32, 0x32, 0x30, 0x34,
380     0x32, 0x34, 0x30, 0x5a, 0x30, 0x81, 0xc6, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06,
381     0x13, 0x02, 0x41, 0x55, 0x31, 0x0c, 0x30, 0x0a, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x03, 0x4e,
382     0x53, 0x57, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x06, 0x53, 0x79, 0x64,
383     0x6e, 0x65, 0x79, 0x31, 0x21, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x18, 0x49, 0x6e,
384     0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x20, 0x57, 0x69, 0x64, 0x67, 0x69, 0x74, 0x73, 0x20, 0x50,
385     0x74, 0x79, 0x20, 0x4c, 0x74, 0x64, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c,
386     0x02, 0x4f, 0x55, 0x31, 0x2a, 0x30, 0x28, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x21, 0x6e, 0x6f,
387     0x6e, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x75, 0x73, 0x74, 0x72, 0x61,
388     0x6c, 0x69, 0x61, 0x2e, 0x6e, 0x6f, 0x6e, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x31,
389     0x3c, 0x30, 0x3a, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x09, 0x01, 0x16, 0x2d,
390     0x6e, 0x6f, 0x6e, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x40, 0x6e, 0x6f, 0x6e, 0x65,
391     0x78, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x75, 0x73, 0x74, 0x72, 0x61, 0x6c, 0x69,
392     0x61, 0x2e, 0x6e, 0x6f, 0x6e, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x30, 0x82, 0x01,
393     0xb6, 0x30, 0x82, 0x01, 0x2b, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x38, 0x04, 0x01, 0x30, 0x82,
394     0x01, 0x1e, 0x02, 0x81, 0x81, 0x00, 0xe6, 0xb9, 0x3b, 0xb0, 0xc8, 0xa8, 0x45, 0xf8, 0x20, 0xf2,
395     0x62, 0x34, 0xaa, 0x09, 0x2d, 0xc1, 0x9b, 0x70, 0xde, 0x0b, 0x4e, 0x93, 0xb1, 0x40, 0x22, 0xf4,
396     0x89, 0x41, 0x8d, 0x0f, 0x17, 0x99, 0x15, 0x65, 0x88, 0xbf, 0x3c, 0x07, 0xf1, 0x92, 0xc0, 0x63,
397     0xfa, 0xed, 0x6a, 0x56, 0x8c, 0xe9, 0xd8, 0x6f, 0xcb, 0x10, 0x40, 0x27, 0x63, 0x38, 0xc0, 0x8f,
398     0x4f, 0x5d, 0xe5, 0x97, 0x9b, 0x3b, 0x74, 0xa2, 0xc3, 0x89, 0xec, 0x54, 0x01, 0x6b, 0xef, 0xb8,
399     0xca, 0x33, 0x06, 0xb3, 0xa4, 0x51, 0xce, 0x02, 0x71, 0x81, 0x26, 0xc8, 0x3b, 0x6d, 0x6e, 0xb0,
400     0x28, 0x9d, 0x5d, 0x44, 0x9b, 0xf4, 0xc5, 0x86, 0x36, 0xe6, 0xe0, 0xbf, 0xc7, 0x43, 0xd9, 0xc7,
401     0x60, 0xfd, 0xef, 0x6b, 0xb9, 0xaf, 0x1e, 0xc0, 0xa0, 0x47, 0xc7, 0xfe, 0x07, 0x38, 0xb8, 0x31,
402     0x01, 0xbf, 0xdd, 0xe4, 0x97, 0xe1, 0x02, 0x15, 0x00, 0xcf, 0x70, 0xf6, 0xf0, 0x7b, 0x10, 0x56,
403     0x2f, 0x41, 0x1d, 0xca, 0x02, 0x4e, 0x3f, 0xcd, 0xbc, 0xef, 0x14, 0x87, 0x3f, 0x02, 0x81, 0x80,
404     0x6a, 0x8a, 0xe3, 0x0f, 0xdd, 0x6d, 0xce, 0xc6, 0x38, 0x44, 0x7c, 0x55, 0x55, 0xe6, 0x08, 0x8f,
405     0x55, 0x12, 0x03, 0xdf, 0xbc, 0x9a, 0x74, 0xc2, 0xc1, 0xf2, 0x10, 0xbc, 0xc4, 0x56, 0xf1, 0xa9,
406     0xb2, 0xee, 0x68, 0xa0, 0x29, 0x61, 0x30, 0xe6, 0x7c, 0x2e, 0xfd, 0x8d, 0x00, 0xf8, 0x54, 0xa9,
407     0xeb, 0x54, 0xf1, 0x35, 0x97, 0xad, 0x3a, 0x15, 0x1d, 0x0a, 0x7f, 0xb7, 0x67, 0x6f, 0x3f, 0xc2,
408     0x88, 0xf7, 0x70, 0x9f, 0xb3, 0xed, 0xfd, 0x7d, 0x0d, 0x1c, 0x7c, 0x0b, 0x42, 0xd5, 0x17, 0x0a,
409     0x3d, 0x10, 0xa1, 0x26, 0x17, 0x88, 0x2b, 0x24, 0x1d, 0x61, 0xf6, 0x92, 0x85, 0x66, 0xfe, 0xae,
410     0x45, 0xab, 0xf9, 0x67, 0xa9, 0xe5, 0x10, 0x1a, 0x79, 0xf7, 0xff, 0x45, 0x03, 0x85, 0xc8, 0xa9,
411     0xc2, 0xbc, 0x02, 0xa9, 0x6b, 0x99, 0x6c, 0x49, 0x24, 0x9a, 0xa2, 0x7e, 0xf2, 0xfc, 0xf4, 0x99,
412     0x03, 0x81, 0x84, 0x00, 0x02, 0x81, 0x80, 0x5c, 0xb1, 0x43, 0xda, 0xc6, 0xff, 0x7e, 0xe9, 0x4f,
413     0x43, 0x76, 0x4b, 0x5a, 0xb7, 0x45, 0xe7, 0x3a, 0x6d, 0xc2, 0x9f, 0xf8, 0x1c, 0x5e, 0x7b, 0x2d,
414     0x76, 0x5e, 0xff, 0x04, 0x44, 0xfc, 0x41, 0x08, 0x15, 0x7f, 0x55, 0x5e, 0x5f, 0x2f, 0x06, 0x59,
415     0x4f, 0xaf, 0x03, 0xf9, 0x49, 0xc9, 0x0d, 0xd4, 0xb3, 0xde, 0x5a, 0x55, 0xd0, 0x78, 0x77, 0x6d,
416     0x0c, 0xb7, 0x37, 0x03, 0xe9, 0x7c, 0xf7, 0x55, 0x19, 0xf4, 0xe1, 0x01, 0x3d, 0xb1, 0xd9, 0xbf,
417     0x42, 0xa3, 0xc4, 0x67, 0x00, 0xa4, 0x51, 0x9f, 0xe3, 0x45, 0xb3, 0x1c, 0xff, 0x1e, 0xfd, 0x02,
418     0x80, 0x0f, 0x2b, 0x05, 0x93, 0x5a, 0xc9, 0xaf, 0x90, 0x85, 0xc8, 0x30, 0x48, 0x10, 0x15, 0x78,
419     0x60, 0xd7, 0xb8, 0x31, 0x67, 0x8b, 0x81, 0x10, 0x0c, 0x5c, 0x98, 0x91, 0xf2, 0x13, 0xf3, 0x89,
420     0x81, 0xe7, 0xe9, 0x4b, 0xd5, 0xa6, 0x94, 0xa3, 0x50, 0x30, 0x4e, 0x30, 0x1d, 0x06, 0x03, 0x55,
421     0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0x59, 0x67, 0xab, 0x05, 0xf7, 0x03, 0xa6, 0xcd, 0x91, 0xd1,
422     0x3a, 0x8f, 0xfe, 0xf2, 0x9c, 0x66, 0xcf, 0x96, 0x74, 0x0b, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d,
423     0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0x59, 0x67, 0xab, 0x05, 0xf7, 0x03, 0xa6, 0xcd, 0x91,
424     0xd1, 0x3a, 0x8f, 0xfe, 0xf2, 0x9c, 0x66, 0xcf, 0x96, 0x74, 0x0b, 0x30, 0x0c, 0x06, 0x03, 0x55,
425     0x1d, 0x13, 0x04, 0x05, 0x30, 0x03, 0x01, 0x01, 0xff, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48,
426     0x01, 0x65, 0x03, 0x04, 0x03, 0x02, 0x03, 0x2f, 0x00, 0x30, 0x2c, 0x02, 0x14, 0x45, 0x42, 0x16,
427     0x1f, 0x87, 0xe9, 0x52, 0x6a, 0xda, 0x51, 0x9a, 0x24, 0xa7, 0x91, 0xf7, 0xff, 0x60, 0x1c, 0x40,
428     0x04, 0x02, 0x14, 0x7d, 0x55, 0x25, 0x8b, 0x59, 0x4a, 0xfa, 0xfd, 0xc4, 0x96, 0x87, 0x55, 0xd0,
429     0xc8, 0xf2, 0xbb, 0x51, 0x98, 0x20, 0x13};
430 
431 static SSL_CTX* ctx = NULL;
432 
psk_callback(SSL * ssl,const char * hint,char * identuty,unsigned int max_identity_len,unsigned char * psk,unsigned int max_psk_len)433 unsigned int psk_callback(SSL* ssl, const char* hint, char* identuty, unsigned int max_identity_len,
434     unsigned char* psk, unsigned int max_psk_len) {
435     memset(psk, 'A', max_psk_len);
436     return max_psk_len;
437 }
438 
LLVMFuzzerInitialize(int * argc,char *** argv)439 int LLVMFuzzerInitialize(int* argc, char*** argv) {
440     HFInit();
441     HFResetRand();
442 
443     ctx = SSL_CTX_new(SSLv23_method());
444     const uint8_t* bufp = kRSAPrivateKeyDER;
445     RSA* privkey = d2i_RSAPrivateKey(NULL, &bufp, sizeof(kRSAPrivateKeyDER));
446     assert(privkey != NULL);
447     EVP_PKEY* pkey = EVP_PKEY_new();
448     EVP_PKEY_assign_RSA(pkey, privkey);
449     int ret = SSL_CTX_use_PrivateKey(ctx, pkey);
450     assert(ret == 1);
451     EVP_PKEY_free(pkey);
452 
453     bufp = kCertificateDER;
454     X509* cert = d2i_X509(NULL, &bufp, sizeof(kCertificateDER));
455     assert(cert != NULL);
456     ret = SSL_CTX_use_certificate(ctx, cert);
457     assert(ret == 1);
458     X509_free(cert);
459 #if defined(HF_SSL_IS_BORINGSSL)
460     ret = SSL_CTX_set_cipher_list(ctx, "ALL");
461 #else
462     ret = SSL_CTX_set_cipher_list(ctx, "ALL:COMPLEMENTOFALL");
463 #endif  // defined(HF_SSL_IS_BORINGSSL)
464     assert(ret == 1);
465 
466     X509_STORE* store = X509_STORE_new();
467     assert(store != NULL);
468 
469     bufp = kRSACACertDER;
470     cert = d2i_X509(NULL, &bufp, sizeof(kRSACACertDER));
471     assert(cert != NULL);
472     ret = SSL_CTX_add_client_CA(ctx, cert);
473     assert(ret == 1);
474     ret = X509_STORE_add_cert(store, cert);
475     assert(ret == 1);
476     X509_free(cert);
477 
478     bufp = kECCACertDER;
479     cert = d2i_X509(NULL, &bufp, sizeof(kECCACertDER));
480     assert(cert != NULL);
481     ret = SSL_CTX_add_client_CA(ctx, cert);
482     assert(ret == 1);
483     ret = X509_STORE_add_cert(store, cert);
484     assert(ret == 1);
485     X509_free(cert);
486 
487     bufp = kDSACertDER;
488     cert = d2i_X509(NULL, &bufp, sizeof(kDSACertDER));
489     assert(cert != NULL);
490     ret = SSL_CTX_add_client_CA(ctx, cert);
491     assert(ret == 1);
492     ret = X509_STORE_add_cert(store, cert);
493     assert(ret == 1);
494     X509_free(cert);
495 
496     SSL_CTX_set_cert_store(ctx, store);
497     SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, NULL);
498     SSL_CTX_set_verify_depth(ctx, 10);
499 
500 #if !defined(HF_SSL_IS_LIBRESSL)
501     SSL_CTX_set_psk_client_callback(ctx, psk_callback);
502     ret = SSL_CTX_use_psk_identity_hint(ctx, "ABCDEFUZZ");
503     assert(ret == 1);
504 #endif /* !defined(HF_SSL_IS_LIBRESSL) */
505 
506     SSL_CTX_set_ecdh_auto(ctx, 1);
507 
508     long opts = SSL_CTX_get_options(ctx);
509     opts |= SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION;
510     opts |= SSL_OP_LEGACY_SERVER_CONNECT;
511     opts |= SSL_OP_ALL;
512     SSL_CTX_set_options(ctx, opts);
513 
514     return 1;
515 }
516 
517 void RAND_reset_for_fuzzing(void) __attribute__((weak));
LLVMFuzzerTestOneInput(const uint8_t * buf,size_t len)518 int LLVMFuzzerTestOneInput(const uint8_t* buf, size_t len) {
519     if (RAND_reset_for_fuzzing) {
520         RAND_reset_for_fuzzing();
521     }
522 
523     SSL* client = SSL_new(ctx);
524     SSL_set_tlsext_host_name(client, "localhost");
525 
526 #if defined(HF_SSL_IS_OPENSSL_GE_1_1) || defined(HF_SSL_IS_BORINGSSL)
527     SSL_set_min_proto_version(client, SSL3_VERSION);
528     SSL_set_max_proto_version(client, TLS1_3_VERSION);
529 #endif  // defined(HF_SSL_IS_OPENSSL_GE_1_1) || defined(HF_SSL_IS_BORINGSSL)
530 
531 #if defined(HF_SSL_FROM_STDIN)
532     BIO* in = BIO_new(BIO_s_fd());
533     BIO_set_fd(in, 0, BIO_NOCLOSE);
534 #else  /* defined(HF_SSL_FROM_STDIN) */
535     BIO* in = BIO_new(BIO_s_mem());
536     BIO_write(in, buf, len);
537 #endif /* defined(HF_SSL_FROM_STDIN) */
538 
539     BIO* out = BIO_new(BIO_s_fd());
540     BIO_set_fd(out, 1, BIO_NOCLOSE);
541 
542     SSL_set_bio(client, in, out);
543     SSL_set_connect_state(client);
544 
545 #if defined(HF_SSL_IS_OPENSSL_GE_1_1)
546     SSL_enable_ct(client, SSL_CT_VALIDATION_PERMISSIVE);
547     SSL_set_dh_auto(client, 1);
548 
549     SSL_set_max_early_data(client, 1024);
550     for (;;) {
551         size_t sz;
552         uint8_t edata_rbuf[128];
553         if (SSL_read_early_data(client, edata_rbuf, sizeof(edata_rbuf), &sz) !=
554             SSL_READ_EARLY_DATA_SUCCESS) {
555             break;
556         }
557     }
558 #endif  // defined(HF_SSL_IS_OPENSSL_GE_1_1)
559 
560     /* Try it two times to test SSL_clear() */
561     for (unsigned i = 0; i < 2; i++) {
562         if (SSL_connect(client) == 1) {
563             uint8_t tmp[1024 * 1024];
564 #if defined(HF_SSL_IS_OPENSSL_GE_1_1)
565             size_t readbytes = 0;
566             SSL_read_early_data(client, tmp, sizeof(tmp), &readbytes);
567 #endif  //  defined(HF_SSL_IS_OPENSSL_GE_1_1)
568             X509* peer;
569             if ((peer = SSL_get_peer_certificate(client)) != NULL) {
570                 if (getenv("HFUZZ_SSL_ABORT_ON_VERIFY")) {
571                     abort();
572                 }
573                 SSL_get_verify_result(client);
574                 X509_free(peer);
575             }
576             // Keep reading application data until error or EOF.
577             for (;;) {
578                 ssize_t r = SSL_read(client, tmp, sizeof(tmp));
579                 if (r <= 0) {
580                     break;
581                 }
582                 if (SSL_write(client, tmp, r) <= 0) {
583                     break;
584                 }
585                 SSL_set_mtu(client, 8);
586             }
587         } else {
588             ERR_print_errors_fp(stderr);
589             break;
590         }
591 
592         if (SSL_shutdown(client) != 1) {
593             break;
594         }
595         if (SSL_clear(client) != 1) {
596             break;
597         }
598     }
599     SSL_free(client);
600 
601     return 0;
602 }
603 
604 #ifdef __cplusplus
605 }
606 #endif
607