1 /*
2 * Copyright 2016-2024 The OpenSSL Project Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 * https://www.openssl.org/source/license.html
8 * or in the file LICENSE in the source distribution.
9 */
10
11 /* Shamelessly copied from BoringSSL and converted to C. */
12
13 /* Test first part of SSL server handshake. */
14
15 /* We need to use some deprecated APIs */
16 #define OPENSSL_SUPPRESS_DEPRECATED
17
18 #include <time.h>
19 #include <openssl/rand.h>
20 #include <openssl/ssl.h>
21 #include <openssl/rsa.h>
22 #include <openssl/dsa.h>
23 #include <openssl/ec.h>
24 #include <openssl/dh.h>
25 #include <openssl/err.h>
26 #include "fuzzer.h"
27
28 /*
29 -----BEGIN CERTIFICATE-----
30 MIIDozCCAougAwIBAgIUSKwQD1qRtS+lridawmaYK6cej2kwDQYJKoZIhvcNAQEL
31 BQAwYTELMAkGA1UEBhMCbm8xCzAJBgNVBAgMAm5vMQswCQYDVQQHDAJubzELMAkG
32 A1UECgwCbm8xCzAJBgNVBAsMAm5vMQswCQYDVQQDDAJubzERMA8GCSqGSIb3DQEJ
33 ARYCbm8wHhcNMjQwMjI4MTkzNzEwWhcNMjUwMjI3MTkzNzEwWjBhMQswCQYDVQQG
34 EwJubzELMAkGA1UECAwCbm8xCzAJBgNVBAcMAm5vMQswCQYDVQQKDAJubzELMAkG
35 A1UECwwCbm8xCzAJBgNVBAMMAm5vMREwDwYJKoZIhvcNAQkBFgJubzCCASIwDQYJ
36 KoZIhvcNAQEBBQADggEPADCCAQoCggEBALWZB9Mtas0V9Sya+UhEabwzs3Eol+/M
37 hwUFWIFrr8tVyYvg8Xs/KnC2VaEpnEltBNLaOADZGUuXzz5Ebccb2i18ghvMDX5o
38 OwAAidL3tv6lh8/Vuj8tpLA53SDR5VTQcxitipsccjacHDftTqDA7+94STT8QSHt
39 Wu5FmXPKvJLmPuKQJMbOJSGDJLvdT/0dyM9aU3xKw64iv7S3laERWyW4/OemMQXs
40 i+kbanpVNJVmqTtS+q/FyYvvr1NpX0Oc/A5H2HYQ6f6P3nvJ22IOXoIcNjI1FmKb
41 X3NJHetHXtyZKXcfpizljsNvbffsL6twxjjCR3JdUqP1xECeuoLBMzkCAwEAAaNT
42 MFEwHQYDVR0OBBYEFKZ2b9IJ3YWCYyMkROjtjF7CxsfaMB8GA1UdIwQYMBaAFKZ2
43 b9IJ3YWCYyMkROjtjF7CxsfaMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEL
44 BQADggEBAGJoHDTsAiuRtACTGiGz/oyNZfH/OUJaijUMaLbHd/JG2L6gtpACYY2b
45 AoLkIcCl38nsLYMLZ32Bbc5jnP/Qy3d2HKsTJ5It4qxDgtbtpU8e5MhEeJoeMHOC
46 fizbcWc7W7m2SLfpeQJWMgu2Da0HYEDS/xzLn7pxQgZpOrMQ7Ihi1jwXfKFqIIal
47 g6SijRGXh7onEAxEmKLkpVQRq633BYPV6odxtXDhxyJKyGjSJsQoKv9oCF2kAdAi
48 CvvatqRWRwgIeln1Sw9Ee6cTYZCG2U+/Uf+Ls7fjN8trb/Shmxo8do/npBnz8j+1
49 a2vbz3gpOsl87U0c01JCl9SZXDSO09w=
50 -----END CERTIFICATE-----
51 */
52 static const uint8_t RSACertificatePEM[] = {
53 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x20, 0x43, 0x45, 0x52, 0x54, 0x49,
54 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x4d, 0x49, 0x49, 0x44,
55 0x6f, 0x7a, 0x43, 0x43, 0x41, 0x6f, 0x75, 0x67, 0x41, 0x77, 0x49, 0x42, 0x41, 0x67, 0x49, 0x55,
56 0x53, 0x4b, 0x77, 0x51, 0x44, 0x31, 0x71, 0x52, 0x74, 0x53, 0x2b, 0x6c, 0x72, 0x69, 0x64, 0x61,
57 0x77, 0x6d, 0x61, 0x59, 0x4b, 0x36, 0x63, 0x65, 0x6a, 0x32, 0x6b, 0x77, 0x44, 0x51, 0x59, 0x4a,
58 0x4b, 0x6f, 0x5a, 0x49, 0x68, 0x76, 0x63, 0x4e, 0x41, 0x51, 0x45, 0x4c, 0x0a, 0x42, 0x51, 0x41,
59 0x77, 0x59, 0x54, 0x45, 0x4c, 0x4d, 0x41, 0x6b, 0x47, 0x41, 0x31, 0x55, 0x45, 0x42, 0x68, 0x4d,
60 0x43, 0x62, 0x6d, 0x38, 0x78, 0x43, 0x7a, 0x41, 0x4a, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x67,
61 0x4d, 0x41, 0x6d, 0x35, 0x76, 0x4d, 0x51, 0x73, 0x77, 0x43, 0x51, 0x59, 0x44, 0x56, 0x51, 0x51,
62 0x48, 0x44, 0x41, 0x4a, 0x75, 0x62, 0x7a, 0x45, 0x4c, 0x4d, 0x41, 0x6b, 0x47, 0x0a, 0x41, 0x31,
63 0x55, 0x45, 0x43, 0x67, 0x77, 0x43, 0x62, 0x6d, 0x38, 0x78, 0x43, 0x7a, 0x41, 0x4a, 0x42, 0x67,
64 0x4e, 0x56, 0x42, 0x41, 0x73, 0x4d, 0x41, 0x6d, 0x35, 0x76, 0x4d, 0x51, 0x73, 0x77, 0x43, 0x51,
65 0x59, 0x44, 0x56, 0x51, 0x51, 0x44, 0x44, 0x41, 0x4a, 0x75, 0x62, 0x7a, 0x45, 0x52, 0x4d, 0x41,
66 0x38, 0x47, 0x43, 0x53, 0x71, 0x47, 0x53, 0x49, 0x62, 0x33, 0x44, 0x51, 0x45, 0x4a, 0x0a, 0x41,
67 0x52, 0x59, 0x43, 0x62, 0x6d, 0x38, 0x77, 0x48, 0x68, 0x63, 0x4e, 0x4d, 0x6a, 0x51, 0x77, 0x4d,
68 0x6a, 0x49, 0x34, 0x4d, 0x54, 0x6b, 0x7a, 0x4e, 0x7a, 0x45, 0x77, 0x57, 0x68, 0x63, 0x4e, 0x4d,
69 0x6a, 0x55, 0x77, 0x4d, 0x6a, 0x49, 0x33, 0x4d, 0x54, 0x6b, 0x7a, 0x4e, 0x7a, 0x45, 0x77, 0x57,
70 0x6a, 0x42, 0x68, 0x4d, 0x51, 0x73, 0x77, 0x43, 0x51, 0x59, 0x44, 0x56, 0x51, 0x51, 0x47, 0x0a,
71 0x45, 0x77, 0x4a, 0x75, 0x62, 0x7a, 0x45, 0x4c, 0x4d, 0x41, 0x6b, 0x47, 0x41, 0x31, 0x55, 0x45,
72 0x43, 0x41, 0x77, 0x43, 0x62, 0x6d, 0x38, 0x78, 0x43, 0x7a, 0x41, 0x4a, 0x42, 0x67, 0x4e, 0x56,
73 0x42, 0x41, 0x63, 0x4d, 0x41, 0x6d, 0x35, 0x76, 0x4d, 0x51, 0x73, 0x77, 0x43, 0x51, 0x59, 0x44,
74 0x56, 0x51, 0x51, 0x4b, 0x44, 0x41, 0x4a, 0x75, 0x62, 0x7a, 0x45, 0x4c, 0x4d, 0x41, 0x6b, 0x47,
75 0x0a, 0x41, 0x31, 0x55, 0x45, 0x43, 0x77, 0x77, 0x43, 0x62, 0x6d, 0x38, 0x78, 0x43, 0x7a, 0x41,
76 0x4a, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x4d, 0x4d, 0x41, 0x6d, 0x35, 0x76, 0x4d, 0x52, 0x45,
77 0x77, 0x44, 0x77, 0x59, 0x4a, 0x4b, 0x6f, 0x5a, 0x49, 0x68, 0x76, 0x63, 0x4e, 0x41, 0x51, 0x6b,
78 0x42, 0x46, 0x67, 0x4a, 0x75, 0x62, 0x7a, 0x43, 0x43, 0x41, 0x53, 0x49, 0x77, 0x44, 0x51, 0x59,
79 0x4a, 0x0a, 0x4b, 0x6f, 0x5a, 0x49, 0x68, 0x76, 0x63, 0x4e, 0x41, 0x51, 0x45, 0x42, 0x42, 0x51,
80 0x41, 0x44, 0x67, 0x67, 0x45, 0x50, 0x41, 0x44, 0x43, 0x43, 0x41, 0x51, 0x6f, 0x43, 0x67, 0x67,
81 0x45, 0x42, 0x41, 0x4c, 0x57, 0x5a, 0x42, 0x39, 0x4d, 0x74, 0x61, 0x73, 0x30, 0x56, 0x39, 0x53,
82 0x79, 0x61, 0x2b, 0x55, 0x68, 0x45, 0x61, 0x62, 0x77, 0x7a, 0x73, 0x33, 0x45, 0x6f, 0x6c, 0x2b,
83 0x2f, 0x4d, 0x0a, 0x68, 0x77, 0x55, 0x46, 0x57, 0x49, 0x46, 0x72, 0x72, 0x38, 0x74, 0x56, 0x79,
84 0x59, 0x76, 0x67, 0x38, 0x58, 0x73, 0x2f, 0x4b, 0x6e, 0x43, 0x32, 0x56, 0x61, 0x45, 0x70, 0x6e,
85 0x45, 0x6c, 0x74, 0x42, 0x4e, 0x4c, 0x61, 0x4f, 0x41, 0x44, 0x5a, 0x47, 0x55, 0x75, 0x58, 0x7a,
86 0x7a, 0x35, 0x45, 0x62, 0x63, 0x63, 0x62, 0x32, 0x69, 0x31, 0x38, 0x67, 0x68, 0x76, 0x4d, 0x44,
87 0x58, 0x35, 0x6f, 0x0a, 0x4f, 0x77, 0x41, 0x41, 0x69, 0x64, 0x4c, 0x33, 0x74, 0x76, 0x36, 0x6c,
88 0x68, 0x38, 0x2f, 0x56, 0x75, 0x6a, 0x38, 0x74, 0x70, 0x4c, 0x41, 0x35, 0x33, 0x53, 0x44, 0x52,
89 0x35, 0x56, 0x54, 0x51, 0x63, 0x78, 0x69, 0x74, 0x69, 0x70, 0x73, 0x63, 0x63, 0x6a, 0x61, 0x63,
90 0x48, 0x44, 0x66, 0x74, 0x54, 0x71, 0x44, 0x41, 0x37, 0x2b, 0x39, 0x34, 0x53, 0x54, 0x54, 0x38,
91 0x51, 0x53, 0x48, 0x74, 0x0a, 0x57, 0x75, 0x35, 0x46, 0x6d, 0x58, 0x50, 0x4b, 0x76, 0x4a, 0x4c,
92 0x6d, 0x50, 0x75, 0x4b, 0x51, 0x4a, 0x4d, 0x62, 0x4f, 0x4a, 0x53, 0x47, 0x44, 0x4a, 0x4c, 0x76,
93 0x64, 0x54, 0x2f, 0x30, 0x64, 0x79, 0x4d, 0x39, 0x61, 0x55, 0x33, 0x78, 0x4b, 0x77, 0x36, 0x34,
94 0x69, 0x76, 0x37, 0x53, 0x33, 0x6c, 0x61, 0x45, 0x52, 0x57, 0x79, 0x57, 0x34, 0x2f, 0x4f, 0x65,
95 0x6d, 0x4d, 0x51, 0x58, 0x73, 0x0a, 0x69, 0x2b, 0x6b, 0x62, 0x61, 0x6e, 0x70, 0x56, 0x4e, 0x4a,
96 0x56, 0x6d, 0x71, 0x54, 0x74, 0x53, 0x2b, 0x71, 0x2f, 0x46, 0x79, 0x59, 0x76, 0x76, 0x72, 0x31,
97 0x4e, 0x70, 0x58, 0x30, 0x4f, 0x63, 0x2f, 0x41, 0x35, 0x48, 0x32, 0x48, 0x59, 0x51, 0x36, 0x66,
98 0x36, 0x50, 0x33, 0x6e, 0x76, 0x4a, 0x32, 0x32, 0x49, 0x4f, 0x58, 0x6f, 0x49, 0x63, 0x4e, 0x6a,
99 0x49, 0x31, 0x46, 0x6d, 0x4b, 0x62, 0x0a, 0x58, 0x33, 0x4e, 0x4a, 0x48, 0x65, 0x74, 0x48, 0x58,
100 0x74, 0x79, 0x5a, 0x4b, 0x58, 0x63, 0x66, 0x70, 0x69, 0x7a, 0x6c, 0x6a, 0x73, 0x4e, 0x76, 0x62,
101 0x66, 0x66, 0x73, 0x4c, 0x36, 0x74, 0x77, 0x78, 0x6a, 0x6a, 0x43, 0x52, 0x33, 0x4a, 0x64, 0x55,
102 0x71, 0x50, 0x31, 0x78, 0x45, 0x43, 0x65, 0x75, 0x6f, 0x4c, 0x42, 0x4d, 0x7a, 0x6b, 0x43, 0x41,
103 0x77, 0x45, 0x41, 0x41, 0x61, 0x4e, 0x54, 0x0a, 0x4d, 0x46, 0x45, 0x77, 0x48, 0x51, 0x59, 0x44,
104 0x56, 0x52, 0x30, 0x4f, 0x42, 0x42, 0x59, 0x45, 0x46, 0x4b, 0x5a, 0x32, 0x62, 0x39, 0x49, 0x4a,
105 0x33, 0x59, 0x57, 0x43, 0x59, 0x79, 0x4d, 0x6b, 0x52, 0x4f, 0x6a, 0x74, 0x6a, 0x46, 0x37, 0x43,
106 0x78, 0x73, 0x66, 0x61, 0x4d, 0x42, 0x38, 0x47, 0x41, 0x31, 0x55, 0x64, 0x49, 0x77, 0x51, 0x59,
107 0x4d, 0x42, 0x61, 0x41, 0x46, 0x4b, 0x5a, 0x32, 0x0a, 0x62, 0x39, 0x49, 0x4a, 0x33, 0x59, 0x57,
108 0x43, 0x59, 0x79, 0x4d, 0x6b, 0x52, 0x4f, 0x6a, 0x74, 0x6a, 0x46, 0x37, 0x43, 0x78, 0x73, 0x66,
109 0x61, 0x4d, 0x41, 0x38, 0x47, 0x41, 0x31, 0x55, 0x64, 0x45, 0x77, 0x45, 0x42, 0x2f, 0x77, 0x51,
110 0x46, 0x4d, 0x41, 0x4d, 0x42, 0x41, 0x66, 0x38, 0x77, 0x44, 0x51, 0x59, 0x4a, 0x4b, 0x6f, 0x5a,
111 0x49, 0x68, 0x76, 0x63, 0x4e, 0x41, 0x51, 0x45, 0x4c, 0x0a, 0x42, 0x51, 0x41, 0x44, 0x67, 0x67,
112 0x45, 0x42, 0x41, 0x47, 0x4a, 0x6f, 0x48, 0x44, 0x54, 0x73, 0x41, 0x69, 0x75, 0x52, 0x74, 0x41,
113 0x43, 0x54, 0x47, 0x69, 0x47, 0x7a, 0x2f, 0x6f, 0x79, 0x4e, 0x5a, 0x66, 0x48, 0x2f, 0x4f, 0x55,
114 0x4a, 0x61, 0x69, 0x6a, 0x55, 0x4d, 0x61, 0x4c, 0x62, 0x48, 0x64, 0x2f, 0x4a, 0x47, 0x32, 0x4c,
115 0x36, 0x67, 0x74, 0x70, 0x41, 0x43, 0x59, 0x59, 0x32, 0x62, 0x0a, 0x41, 0x6f, 0x4c, 0x6b, 0x49,
116 0x63, 0x43, 0x6c, 0x33, 0x38, 0x6e, 0x73, 0x4c, 0x59, 0x4d, 0x4c, 0x5a, 0x33, 0x32, 0x42, 0x62,
117 0x63, 0x35, 0x6a, 0x6e, 0x50, 0x2f, 0x51, 0x79, 0x33, 0x64, 0x32, 0x48, 0x4b, 0x73, 0x54, 0x4a,
118 0x35, 0x49, 0x74, 0x34, 0x71, 0x78, 0x44, 0x67, 0x74, 0x62, 0x74, 0x70, 0x55, 0x38, 0x65, 0x35,
119 0x4d, 0x68, 0x45, 0x65, 0x4a, 0x6f, 0x65, 0x4d, 0x48, 0x4f, 0x43, 0x0a, 0x66, 0x69, 0x7a, 0x62,
120 0x63, 0x57, 0x63, 0x37, 0x57, 0x37, 0x6d, 0x32, 0x53, 0x4c, 0x66, 0x70, 0x65, 0x51, 0x4a, 0x57,
121 0x4d, 0x67, 0x75, 0x32, 0x44, 0x61, 0x30, 0x48, 0x59, 0x45, 0x44, 0x53, 0x2f, 0x78, 0x7a, 0x4c,
122 0x6e, 0x37, 0x70, 0x78, 0x51, 0x67, 0x5a, 0x70, 0x4f, 0x72, 0x4d, 0x51, 0x37, 0x49, 0x68, 0x69,
123 0x31, 0x6a, 0x77, 0x58, 0x66, 0x4b, 0x46, 0x71, 0x49, 0x49, 0x61, 0x6c, 0x0a, 0x67, 0x36, 0x53,
124 0x69, 0x6a, 0x52, 0x47, 0x58, 0x68, 0x37, 0x6f, 0x6e, 0x45, 0x41, 0x78, 0x45, 0x6d, 0x4b, 0x4c,
125 0x6b, 0x70, 0x56, 0x51, 0x52, 0x71, 0x36, 0x33, 0x33, 0x42, 0x59, 0x50, 0x56, 0x36, 0x6f, 0x64,
126 0x78, 0x74, 0x58, 0x44, 0x68, 0x78, 0x79, 0x4a, 0x4b, 0x79, 0x47, 0x6a, 0x53, 0x4a, 0x73, 0x51,
127 0x6f, 0x4b, 0x76, 0x39, 0x6f, 0x43, 0x46, 0x32, 0x6b, 0x41, 0x64, 0x41, 0x69, 0x0a, 0x43, 0x76,
128 0x76, 0x61, 0x74, 0x71, 0x52, 0x57, 0x52, 0x77, 0x67, 0x49, 0x65, 0x6c, 0x6e, 0x31, 0x53, 0x77,
129 0x39, 0x45, 0x65, 0x36, 0x63, 0x54, 0x59, 0x5a, 0x43, 0x47, 0x32, 0x55, 0x2b, 0x2f, 0x55, 0x66,
130 0x2b, 0x4c, 0x73, 0x37, 0x66, 0x6a, 0x4e, 0x38, 0x74, 0x72, 0x62, 0x2f, 0x53, 0x68, 0x6d, 0x78,
131 0x6f, 0x38, 0x64, 0x6f, 0x2f, 0x6e, 0x70, 0x42, 0x6e, 0x7a, 0x38, 0x6a, 0x2b, 0x31, 0x0a, 0x61,
132 0x32, 0x76, 0x62, 0x7a, 0x33, 0x67, 0x70, 0x4f, 0x73, 0x6c, 0x38, 0x37, 0x55, 0x30, 0x63, 0x30,
133 0x31, 0x4a, 0x43, 0x6c, 0x39, 0x53, 0x5a, 0x58, 0x44, 0x53, 0x4f, 0x30, 0x39, 0x77, 0x3d, 0x0a,
134 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x45, 0x4e, 0x44, 0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49,
135 0x43, 0x41, 0x54, 0x45, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a,
136 };
137
138 #ifndef OPENSSL_NO_DEPRECATED_3_0
139 /*
140 -----BEGIN PRIVATE KEY-----
141 MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC1mQfTLWrNFfUs
142 mvlIRGm8M7NxKJfvzIcFBViBa6/LVcmL4PF7PypwtlWhKZxJbQTS2jgA2RlLl88+
143 RG3HG9otfIIbzA1+aDsAAInS97b+pYfP1bo/LaSwOd0g0eVU0HMYrYqbHHI2nBw3
144 7U6gwO/veEk0/EEh7VruRZlzyryS5j7ikCTGziUhgyS73U/9HcjPWlN8SsOuIr+0
145 t5WhEVsluPznpjEF7IvpG2p6VTSVZqk7UvqvxcmL769TaV9DnPwOR9h2EOn+j957
146 ydtiDl6CHDYyNRZim19zSR3rR17cmSl3H6Ys5Y7Db2337C+rcMY4wkdyXVKj9cRA
147 nrqCwTM5AgMBAAECggEAFOD+XFJZeDDxGmrLBHsRKRlMpVMEfQan83TU4zRtZtR7
148 MsDvIrt1drYQDFKLbInDRzbdv4M2fFF8+2zErmLOZ/JrxyRj3MfBGNP3BLGEcay4
149 e7XYDxGBYN2WRgK7+k9pHEo/qGvR2eOC/w8ivirQq1jKGfRyzKLMlJ6d8Qk7OyxZ
150 n0u3v2EJ9CWoNDgUH4exCil/Oe4h5WA59xT5NAkx4RUojsJiExWZpzT/VX1d21mN
151 WMb5EO8eyi6FyZlAcb9MID0kMF6Q3hUv+jTw+X9yig+3B9bg2Z0I+IKHl9InShkC
152 ndYn4ad0zd/ggMVkloomh4uaSqZxUi3ywtszZkRbzQKBgQD7Pvx1ErKm5lZDAS2b
153 b4rltzqJRUEKyEqjqzPzgasOa0jWEq/fxuGc/bixg/EBaQ8yyTGYdIYyr7DKYYjC
154 0AGVnBCh0+TFUDB1kfwkbef2b8yufQ/vJwcOJ+5kBXQZx8+L8U9iWKANXxkEeCX2
155 iWPZPz52pTTYlf90PLzEW6QyDwKBgQC5CKyfUwx3Ba2iXtfIreyPqDobbybyTEYk
156 ayA2oElSdejgVkWwJ+q77gwrnF5Pe9zbpUBoc7VJjrRhUojI7LOySyto3WYYoczX
157 LprzPnj2yEVeV2lrTS6lKNpdraO8QZcSD7mUUmiNRZnoPK16Mm9qjkk29HnY7Msq
158 pkiOg4huNwKBgQCkh2HBtOXjH/GbXVklcc0Ok4e0vvJSAknGlmWl7+M5xQ3kikY8
159 D7xNF2XscY/QsaDvTAu7X4tGBAGM9oQdtyNietn1b5JfmByz0U7B+Gsv2ZS7K1DU
160 9sTLA2E8hMm73DpQ1Ux8BbeCKiVy5M9PfDcz3BOmlJdfwhKQZvniyHRlBwKBgQCH
161 /sAhOcDnmdzMgjjG3k4IJ/TNRRyy6SyEh9fdTmGVoePPPplpp2z3Qzbetsb6VGc3
162 aHW2T5Tmw2QAQ9EVHCPW3zjAkjj/0avkW/S24yu09e1GMajhnJC0Axq7z2uQagTG
163 2ZfkU81UR9uevTojnf4Vqw5UvcrwjNmmNyEM3c/gcQKBgHa2dT5svzM1jReiO3Vt
164 dAUDztGKUE3clPV35L2xmJeJDXPOqCL3qoZ9A6hHmDw6gmg82gQDQeJbL/+jKkon
165 e6atH/Dfr+M4nPft9Lt4fOAWOQ3tDsDuCkOMjSTn8cLMZLGcwT2H1H2vBocM+UTd
166 hljAVnB9v6NMfcRERTx10SUc
167 -----END PRIVATE KEY-----
168 */
169 static const uint8_t RSAPrivateKeyPEM[] = {
170 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x20, 0x50, 0x52, 0x49, 0x56, 0x41,
171 0x54, 0x45, 0x20, 0x4b, 0x45, 0x59, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x4d, 0x49, 0x49, 0x45,
172 0x76, 0x67, 0x49, 0x42, 0x41, 0x44, 0x41, 0x4e, 0x42, 0x67, 0x6b, 0x71, 0x68, 0x6b, 0x69, 0x47,
173 0x39, 0x77, 0x30, 0x42, 0x41, 0x51, 0x45, 0x46, 0x41, 0x41, 0x53, 0x43, 0x42, 0x4b, 0x67, 0x77,
174 0x67, 0x67, 0x53, 0x6b, 0x41, 0x67, 0x45, 0x41, 0x41, 0x6f, 0x49, 0x42, 0x41, 0x51, 0x43, 0x31,
175 0x6d, 0x51, 0x66, 0x54, 0x4c, 0x57, 0x72, 0x4e, 0x46, 0x66, 0x55, 0x73, 0x0a, 0x6d, 0x76, 0x6c,
176 0x49, 0x52, 0x47, 0x6d, 0x38, 0x4d, 0x37, 0x4e, 0x78, 0x4b, 0x4a, 0x66, 0x76, 0x7a, 0x49, 0x63,
177 0x46, 0x42, 0x56, 0x69, 0x42, 0x61, 0x36, 0x2f, 0x4c, 0x56, 0x63, 0x6d, 0x4c, 0x34, 0x50, 0x46,
178 0x37, 0x50, 0x79, 0x70, 0x77, 0x74, 0x6c, 0x57, 0x68, 0x4b, 0x5a, 0x78, 0x4a, 0x62, 0x51, 0x54,
179 0x53, 0x32, 0x6a, 0x67, 0x41, 0x32, 0x52, 0x6c, 0x4c, 0x6c, 0x38, 0x38, 0x2b, 0x0a, 0x52, 0x47,
180 0x33, 0x48, 0x47, 0x39, 0x6f, 0x74, 0x66, 0x49, 0x49, 0x62, 0x7a, 0x41, 0x31, 0x2b, 0x61, 0x44,
181 0x73, 0x41, 0x41, 0x49, 0x6e, 0x53, 0x39, 0x37, 0x62, 0x2b, 0x70, 0x59, 0x66, 0x50, 0x31, 0x62,
182 0x6f, 0x2f, 0x4c, 0x61, 0x53, 0x77, 0x4f, 0x64, 0x30, 0x67, 0x30, 0x65, 0x56, 0x55, 0x30, 0x48,
183 0x4d, 0x59, 0x72, 0x59, 0x71, 0x62, 0x48, 0x48, 0x49, 0x32, 0x6e, 0x42, 0x77, 0x33, 0x0a, 0x37,
184 0x55, 0x36, 0x67, 0x77, 0x4f, 0x2f, 0x76, 0x65, 0x45, 0x6b, 0x30, 0x2f, 0x45, 0x45, 0x68, 0x37,
185 0x56, 0x72, 0x75, 0x52, 0x5a, 0x6c, 0x7a, 0x79, 0x72, 0x79, 0x53, 0x35, 0x6a, 0x37, 0x69, 0x6b,
186 0x43, 0x54, 0x47, 0x7a, 0x69, 0x55, 0x68, 0x67, 0x79, 0x53, 0x37, 0x33, 0x55, 0x2f, 0x39, 0x48,
187 0x63, 0x6a, 0x50, 0x57, 0x6c, 0x4e, 0x38, 0x53, 0x73, 0x4f, 0x75, 0x49, 0x72, 0x2b, 0x30, 0x0a,
188 0x74, 0x35, 0x57, 0x68, 0x45, 0x56, 0x73, 0x6c, 0x75, 0x50, 0x7a, 0x6e, 0x70, 0x6a, 0x45, 0x46,
189 0x37, 0x49, 0x76, 0x70, 0x47, 0x32, 0x70, 0x36, 0x56, 0x54, 0x53, 0x56, 0x5a, 0x71, 0x6b, 0x37,
190 0x55, 0x76, 0x71, 0x76, 0x78, 0x63, 0x6d, 0x4c, 0x37, 0x36, 0x39, 0x54, 0x61, 0x56, 0x39, 0x44,
191 0x6e, 0x50, 0x77, 0x4f, 0x52, 0x39, 0x68, 0x32, 0x45, 0x4f, 0x6e, 0x2b, 0x6a, 0x39, 0x35, 0x37,
192 0x0a, 0x79, 0x64, 0x74, 0x69, 0x44, 0x6c, 0x36, 0x43, 0x48, 0x44, 0x59, 0x79, 0x4e, 0x52, 0x5a,
193 0x69, 0x6d, 0x31, 0x39, 0x7a, 0x53, 0x52, 0x33, 0x72, 0x52, 0x31, 0x37, 0x63, 0x6d, 0x53, 0x6c,
194 0x33, 0x48, 0x36, 0x59, 0x73, 0x35, 0x59, 0x37, 0x44, 0x62, 0x32, 0x33, 0x33, 0x37, 0x43, 0x2b,
195 0x72, 0x63, 0x4d, 0x59, 0x34, 0x77, 0x6b, 0x64, 0x79, 0x58, 0x56, 0x4b, 0x6a, 0x39, 0x63, 0x52,
196 0x41, 0x0a, 0x6e, 0x72, 0x71, 0x43, 0x77, 0x54, 0x4d, 0x35, 0x41, 0x67, 0x4d, 0x42, 0x41, 0x41,
197 0x45, 0x43, 0x67, 0x67, 0x45, 0x41, 0x46, 0x4f, 0x44, 0x2b, 0x58, 0x46, 0x4a, 0x5a, 0x65, 0x44,
198 0x44, 0x78, 0x47, 0x6d, 0x72, 0x4c, 0x42, 0x48, 0x73, 0x52, 0x4b, 0x52, 0x6c, 0x4d, 0x70, 0x56,
199 0x4d, 0x45, 0x66, 0x51, 0x61, 0x6e, 0x38, 0x33, 0x54, 0x55, 0x34, 0x7a, 0x52, 0x74, 0x5a, 0x74,
200 0x52, 0x37, 0x0a, 0x4d, 0x73, 0x44, 0x76, 0x49, 0x72, 0x74, 0x31, 0x64, 0x72, 0x59, 0x51, 0x44,
201 0x46, 0x4b, 0x4c, 0x62, 0x49, 0x6e, 0x44, 0x52, 0x7a, 0x62, 0x64, 0x76, 0x34, 0x4d, 0x32, 0x66,
202 0x46, 0x46, 0x38, 0x2b, 0x32, 0x7a, 0x45, 0x72, 0x6d, 0x4c, 0x4f, 0x5a, 0x2f, 0x4a, 0x72, 0x78,
203 0x79, 0x52, 0x6a, 0x33, 0x4d, 0x66, 0x42, 0x47, 0x4e, 0x50, 0x33, 0x42, 0x4c, 0x47, 0x45, 0x63,
204 0x61, 0x79, 0x34, 0x0a, 0x65, 0x37, 0x58, 0x59, 0x44, 0x78, 0x47, 0x42, 0x59, 0x4e, 0x32, 0x57,
205 0x52, 0x67, 0x4b, 0x37, 0x2b, 0x6b, 0x39, 0x70, 0x48, 0x45, 0x6f, 0x2f, 0x71, 0x47, 0x76, 0x52,
206 0x32, 0x65, 0x4f, 0x43, 0x2f, 0x77, 0x38, 0x69, 0x76, 0x69, 0x72, 0x51, 0x71, 0x31, 0x6a, 0x4b,
207 0x47, 0x66, 0x52, 0x79, 0x7a, 0x4b, 0x4c, 0x4d, 0x6c, 0x4a, 0x36, 0x64, 0x38, 0x51, 0x6b, 0x37,
208 0x4f, 0x79, 0x78, 0x5a, 0x0a, 0x6e, 0x30, 0x75, 0x33, 0x76, 0x32, 0x45, 0x4a, 0x39, 0x43, 0x57,
209 0x6f, 0x4e, 0x44, 0x67, 0x55, 0x48, 0x34, 0x65, 0x78, 0x43, 0x69, 0x6c, 0x2f, 0x4f, 0x65, 0x34,
210 0x68, 0x35, 0x57, 0x41, 0x35, 0x39, 0x78, 0x54, 0x35, 0x4e, 0x41, 0x6b, 0x78, 0x34, 0x52, 0x55,
211 0x6f, 0x6a, 0x73, 0x4a, 0x69, 0x45, 0x78, 0x57, 0x5a, 0x70, 0x7a, 0x54, 0x2f, 0x56, 0x58, 0x31,
212 0x64, 0x32, 0x31, 0x6d, 0x4e, 0x0a, 0x57, 0x4d, 0x62, 0x35, 0x45, 0x4f, 0x38, 0x65, 0x79, 0x69,
213 0x36, 0x46, 0x79, 0x5a, 0x6c, 0x41, 0x63, 0x62, 0x39, 0x4d, 0x49, 0x44, 0x30, 0x6b, 0x4d, 0x46,
214 0x36, 0x51, 0x33, 0x68, 0x55, 0x76, 0x2b, 0x6a, 0x54, 0x77, 0x2b, 0x58, 0x39, 0x79, 0x69, 0x67,
215 0x2b, 0x33, 0x42, 0x39, 0x62, 0x67, 0x32, 0x5a, 0x30, 0x49, 0x2b, 0x49, 0x4b, 0x48, 0x6c, 0x39,
216 0x49, 0x6e, 0x53, 0x68, 0x6b, 0x43, 0x0a, 0x6e, 0x64, 0x59, 0x6e, 0x34, 0x61, 0x64, 0x30, 0x7a,
217 0x64, 0x2f, 0x67, 0x67, 0x4d, 0x56, 0x6b, 0x6c, 0x6f, 0x6f, 0x6d, 0x68, 0x34, 0x75, 0x61, 0x53,
218 0x71, 0x5a, 0x78, 0x55, 0x69, 0x33, 0x79, 0x77, 0x74, 0x73, 0x7a, 0x5a, 0x6b, 0x52, 0x62, 0x7a,
219 0x51, 0x4b, 0x42, 0x67, 0x51, 0x44, 0x37, 0x50, 0x76, 0x78, 0x31, 0x45, 0x72, 0x4b, 0x6d, 0x35,
220 0x6c, 0x5a, 0x44, 0x41, 0x53, 0x32, 0x62, 0x0a, 0x62, 0x34, 0x72, 0x6c, 0x74, 0x7a, 0x71, 0x4a,
221 0x52, 0x55, 0x45, 0x4b, 0x79, 0x45, 0x71, 0x6a, 0x71, 0x7a, 0x50, 0x7a, 0x67, 0x61, 0x73, 0x4f,
222 0x61, 0x30, 0x6a, 0x57, 0x45, 0x71, 0x2f, 0x66, 0x78, 0x75, 0x47, 0x63, 0x2f, 0x62, 0x69, 0x78,
223 0x67, 0x2f, 0x45, 0x42, 0x61, 0x51, 0x38, 0x79, 0x79, 0x54, 0x47, 0x59, 0x64, 0x49, 0x59, 0x79,
224 0x72, 0x37, 0x44, 0x4b, 0x59, 0x59, 0x6a, 0x43, 0x0a, 0x30, 0x41, 0x47, 0x56, 0x6e, 0x42, 0x43,
225 0x68, 0x30, 0x2b, 0x54, 0x46, 0x55, 0x44, 0x42, 0x31, 0x6b, 0x66, 0x77, 0x6b, 0x62, 0x65, 0x66,
226 0x32, 0x62, 0x38, 0x79, 0x75, 0x66, 0x51, 0x2f, 0x76, 0x4a, 0x77, 0x63, 0x4f, 0x4a, 0x2b, 0x35,
227 0x6b, 0x42, 0x58, 0x51, 0x5a, 0x78, 0x38, 0x2b, 0x4c, 0x38, 0x55, 0x39, 0x69, 0x57, 0x4b, 0x41,
228 0x4e, 0x58, 0x78, 0x6b, 0x45, 0x65, 0x43, 0x58, 0x32, 0x0a, 0x69, 0x57, 0x50, 0x5a, 0x50, 0x7a,
229 0x35, 0x32, 0x70, 0x54, 0x54, 0x59, 0x6c, 0x66, 0x39, 0x30, 0x50, 0x4c, 0x7a, 0x45, 0x57, 0x36,
230 0x51, 0x79, 0x44, 0x77, 0x4b, 0x42, 0x67, 0x51, 0x43, 0x35, 0x43, 0x4b, 0x79, 0x66, 0x55, 0x77,
231 0x78, 0x33, 0x42, 0x61, 0x32, 0x69, 0x58, 0x74, 0x66, 0x49, 0x72, 0x65, 0x79, 0x50, 0x71, 0x44,
232 0x6f, 0x62, 0x62, 0x79, 0x62, 0x79, 0x54, 0x45, 0x59, 0x6b, 0x0a, 0x61, 0x79, 0x41, 0x32, 0x6f,
233 0x45, 0x6c, 0x53, 0x64, 0x65, 0x6a, 0x67, 0x56, 0x6b, 0x57, 0x77, 0x4a, 0x2b, 0x71, 0x37, 0x37,
234 0x67, 0x77, 0x72, 0x6e, 0x46, 0x35, 0x50, 0x65, 0x39, 0x7a, 0x62, 0x70, 0x55, 0x42, 0x6f, 0x63,
235 0x37, 0x56, 0x4a, 0x6a, 0x72, 0x52, 0x68, 0x55, 0x6f, 0x6a, 0x49, 0x37, 0x4c, 0x4f, 0x79, 0x53,
236 0x79, 0x74, 0x6f, 0x33, 0x57, 0x59, 0x59, 0x6f, 0x63, 0x7a, 0x58, 0x0a, 0x4c, 0x70, 0x72, 0x7a,
237 0x50, 0x6e, 0x6a, 0x32, 0x79, 0x45, 0x56, 0x65, 0x56, 0x32, 0x6c, 0x72, 0x54, 0x53, 0x36, 0x6c,
238 0x4b, 0x4e, 0x70, 0x64, 0x72, 0x61, 0x4f, 0x38, 0x51, 0x5a, 0x63, 0x53, 0x44, 0x37, 0x6d, 0x55,
239 0x55, 0x6d, 0x69, 0x4e, 0x52, 0x5a, 0x6e, 0x6f, 0x50, 0x4b, 0x31, 0x36, 0x4d, 0x6d, 0x39, 0x71,
240 0x6a, 0x6b, 0x6b, 0x32, 0x39, 0x48, 0x6e, 0x59, 0x37, 0x4d, 0x73, 0x71, 0x0a, 0x70, 0x6b, 0x69,
241 0x4f, 0x67, 0x34, 0x68, 0x75, 0x4e, 0x77, 0x4b, 0x42, 0x67, 0x51, 0x43, 0x6b, 0x68, 0x32, 0x48,
242 0x42, 0x74, 0x4f, 0x58, 0x6a, 0x48, 0x2f, 0x47, 0x62, 0x58, 0x56, 0x6b, 0x6c, 0x63, 0x63, 0x30,
243 0x4f, 0x6b, 0x34, 0x65, 0x30, 0x76, 0x76, 0x4a, 0x53, 0x41, 0x6b, 0x6e, 0x47, 0x6c, 0x6d, 0x57,
244 0x6c, 0x37, 0x2b, 0x4d, 0x35, 0x78, 0x51, 0x33, 0x6b, 0x69, 0x6b, 0x59, 0x38, 0x0a, 0x44, 0x37,
245 0x78, 0x4e, 0x46, 0x32, 0x58, 0x73, 0x63, 0x59, 0x2f, 0x51, 0x73, 0x61, 0x44, 0x76, 0x54, 0x41,
246 0x75, 0x37, 0x58, 0x34, 0x74, 0x47, 0x42, 0x41, 0x47, 0x4d, 0x39, 0x6f, 0x51, 0x64, 0x74, 0x79,
247 0x4e, 0x69, 0x65, 0x74, 0x6e, 0x31, 0x62, 0x35, 0x4a, 0x66, 0x6d, 0x42, 0x79, 0x7a, 0x30, 0x55,
248 0x37, 0x42, 0x2b, 0x47, 0x73, 0x76, 0x32, 0x5a, 0x53, 0x37, 0x4b, 0x31, 0x44, 0x55, 0x0a, 0x39,
249 0x73, 0x54, 0x4c, 0x41, 0x32, 0x45, 0x38, 0x68, 0x4d, 0x6d, 0x37, 0x33, 0x44, 0x70, 0x51, 0x31,
250 0x55, 0x78, 0x38, 0x42, 0x62, 0x65, 0x43, 0x4b, 0x69, 0x56, 0x79, 0x35, 0x4d, 0x39, 0x50, 0x66,
251 0x44, 0x63, 0x7a, 0x33, 0x42, 0x4f, 0x6d, 0x6c, 0x4a, 0x64, 0x66, 0x77, 0x68, 0x4b, 0x51, 0x5a,
252 0x76, 0x6e, 0x69, 0x79, 0x48, 0x52, 0x6c, 0x42, 0x77, 0x4b, 0x42, 0x67, 0x51, 0x43, 0x48, 0x0a,
253 0x2f, 0x73, 0x41, 0x68, 0x4f, 0x63, 0x44, 0x6e, 0x6d, 0x64, 0x7a, 0x4d, 0x67, 0x6a, 0x6a, 0x47,
254 0x33, 0x6b, 0x34, 0x49, 0x4a, 0x2f, 0x54, 0x4e, 0x52, 0x52, 0x79, 0x79, 0x36, 0x53, 0x79, 0x45,
255 0x68, 0x39, 0x66, 0x64, 0x54, 0x6d, 0x47, 0x56, 0x6f, 0x65, 0x50, 0x50, 0x50, 0x70, 0x6c, 0x70,
256 0x70, 0x32, 0x7a, 0x33, 0x51, 0x7a, 0x62, 0x65, 0x74, 0x73, 0x62, 0x36, 0x56, 0x47, 0x63, 0x33,
257 0x0a, 0x61, 0x48, 0x57, 0x32, 0x54, 0x35, 0x54, 0x6d, 0x77, 0x32, 0x51, 0x41, 0x51, 0x39, 0x45,
258 0x56, 0x48, 0x43, 0x50, 0x57, 0x33, 0x7a, 0x6a, 0x41, 0x6b, 0x6a, 0x6a, 0x2f, 0x30, 0x61, 0x76,
259 0x6b, 0x57, 0x2f, 0x53, 0x32, 0x34, 0x79, 0x75, 0x30, 0x39, 0x65, 0x31, 0x47, 0x4d, 0x61, 0x6a,
260 0x68, 0x6e, 0x4a, 0x43, 0x30, 0x41, 0x78, 0x71, 0x37, 0x7a, 0x32, 0x75, 0x51, 0x61, 0x67, 0x54,
261 0x47, 0x0a, 0x32, 0x5a, 0x66, 0x6b, 0x55, 0x38, 0x31, 0x55, 0x52, 0x39, 0x75, 0x65, 0x76, 0x54,
262 0x6f, 0x6a, 0x6e, 0x66, 0x34, 0x56, 0x71, 0x77, 0x35, 0x55, 0x76, 0x63, 0x72, 0x77, 0x6a, 0x4e,
263 0x6d, 0x6d, 0x4e, 0x79, 0x45, 0x4d, 0x33, 0x63, 0x2f, 0x67, 0x63, 0x51, 0x4b, 0x42, 0x67, 0x48,
264 0x61, 0x32, 0x64, 0x54, 0x35, 0x73, 0x76, 0x7a, 0x4d, 0x31, 0x6a, 0x52, 0x65, 0x69, 0x4f, 0x33,
265 0x56, 0x74, 0x0a, 0x64, 0x41, 0x55, 0x44, 0x7a, 0x74, 0x47, 0x4b, 0x55, 0x45, 0x33, 0x63, 0x6c,
266 0x50, 0x56, 0x33, 0x35, 0x4c, 0x32, 0x78, 0x6d, 0x4a, 0x65, 0x4a, 0x44, 0x58, 0x50, 0x4f, 0x71,
267 0x43, 0x4c, 0x33, 0x71, 0x6f, 0x5a, 0x39, 0x41, 0x36, 0x68, 0x48, 0x6d, 0x44, 0x77, 0x36, 0x67,
268 0x6d, 0x67, 0x38, 0x32, 0x67, 0x51, 0x44, 0x51, 0x65, 0x4a, 0x62, 0x4c, 0x2f, 0x2b, 0x6a, 0x4b,
269 0x6b, 0x6f, 0x6e, 0x0a, 0x65, 0x36, 0x61, 0x74, 0x48, 0x2f, 0x44, 0x66, 0x72, 0x2b, 0x4d, 0x34,
270 0x6e, 0x50, 0x66, 0x74, 0x39, 0x4c, 0x74, 0x34, 0x66, 0x4f, 0x41, 0x57, 0x4f, 0x51, 0x33, 0x74,
271 0x44, 0x73, 0x44, 0x75, 0x43, 0x6b, 0x4f, 0x4d, 0x6a, 0x53, 0x54, 0x6e, 0x38, 0x63, 0x4c, 0x4d,
272 0x5a, 0x4c, 0x47, 0x63, 0x77, 0x54, 0x32, 0x48, 0x31, 0x48, 0x32, 0x76, 0x42, 0x6f, 0x63, 0x4d,
273 0x2b, 0x55, 0x54, 0x64, 0x0a, 0x68, 0x6c, 0x6a, 0x41, 0x56, 0x6e, 0x42, 0x39, 0x76, 0x36, 0x4e,
274 0x4d, 0x66, 0x63, 0x52, 0x45, 0x52, 0x54, 0x78, 0x31, 0x30, 0x53, 0x55, 0x63, 0x0a, 0x2d, 0x2d,
275 0x2d, 0x2d, 0x2d, 0x45, 0x4e, 0x44, 0x20, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x20, 0x4b,
276 0x45, 0x59, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a,
277 };
278 #endif
279
280 #ifndef OPENSSL_NO_EC
281 # ifndef OPENSSL_NO_DEPRECATED_3_0
282 /*
283 -----BEGIN EC PRIVATE KEY-----
284 MHcCAQEEIJLyl7hJjpQL/RhP1x2zS79xdiPJQB683gWeqcqHPeZkoAoGCCqGSM49
285 AwEHoUQDQgAEdsjygVYjjaKBF4CNECVllNf017p5/MxNSWDoTHy9I2GeDwEDDazI
286 D/xy8JiYjtPKVE/Zqwbmivp2UwtH28a7NQ==
287 -----END EC PRIVATE KEY-----
288 */
289 static const char ECDSAPrivateKeyPEM[] = {
290 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x20, 0x45,
291 0x43, 0x20, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x20, 0x4b, 0x45,
292 0x59, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x4d, 0x48, 0x63, 0x43, 0x41,
293 0x51, 0x45, 0x45, 0x49, 0x4a, 0x4c, 0x79, 0x6c, 0x37, 0x68, 0x4a, 0x6a,
294 0x70, 0x51, 0x4c, 0x2f, 0x52, 0x68, 0x50, 0x31, 0x78, 0x32, 0x7a, 0x53,
295 0x37, 0x39, 0x78, 0x64, 0x69, 0x50, 0x4a, 0x51, 0x42, 0x36, 0x38, 0x33,
296 0x67, 0x57, 0x65, 0x71, 0x63, 0x71, 0x48, 0x50, 0x65, 0x5a, 0x6b, 0x6f,
297 0x41, 0x6f, 0x47, 0x43, 0x43, 0x71, 0x47, 0x53, 0x4d, 0x34, 0x39, 0x0a,
298 0x41, 0x77, 0x45, 0x48, 0x6f, 0x55, 0x51, 0x44, 0x51, 0x67, 0x41, 0x45,
299 0x64, 0x73, 0x6a, 0x79, 0x67, 0x56, 0x59, 0x6a, 0x6a, 0x61, 0x4b, 0x42,
300 0x46, 0x34, 0x43, 0x4e, 0x45, 0x43, 0x56, 0x6c, 0x6c, 0x4e, 0x66, 0x30,
301 0x31, 0x37, 0x70, 0x35, 0x2f, 0x4d, 0x78, 0x4e, 0x53, 0x57, 0x44, 0x6f,
302 0x54, 0x48, 0x79, 0x39, 0x49, 0x32, 0x47, 0x65, 0x44, 0x77, 0x45, 0x44,
303 0x44, 0x61, 0x7a, 0x49, 0x0a, 0x44, 0x2f, 0x78, 0x79, 0x38, 0x4a, 0x69,
304 0x59, 0x6a, 0x74, 0x50, 0x4b, 0x56, 0x45, 0x2f, 0x5a, 0x71, 0x77, 0x62,
305 0x6d, 0x69, 0x76, 0x70, 0x32, 0x55, 0x77, 0x74, 0x48, 0x32, 0x38, 0x61,
306 0x37, 0x4e, 0x51, 0x3d, 0x3d, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x45,
307 0x4e, 0x44, 0x20, 0x45, 0x43, 0x20, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54,
308 0x45, 0x20, 0x4b, 0x45, 0x59, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a
309 };
310 # endif
311
312 /*
313 -----BEGIN CERTIFICATE-----
314 MIIBXzCCAQagAwIBAgIJAK6/Yvf/ain6MAoGCCqGSM49BAMCMBIxEDAOBgNVBAoM
315 B0FjbWUgQ28wHhcNMTYxMjI1MTEzOTI3WhcNMjYxMjI1MTEzOTI3WjASMRAwDgYD
316 VQQKDAdBY21lIENvMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdsjygVYjjaKB
317 F4CNECVllNf017p5/MxNSWDoTHy9I2GeDwEDDazID/xy8JiYjtPKVE/Zqwbmivp2
318 UwtH28a7NaNFMEMwCQYDVR0TBAIwADALBgNVHQ8EBAMCBaAwEwYDVR0lBAwwCgYI
319 KwYBBQUHAwEwFAYDVR0RBA0wC4IJbG9jYWxob3N0MAoGCCqGSM49BAMCA0cAMEQC
320 IEzr3t/jejVE9oSnBp8c3P2p+lDLVRrB8zxLyjZvirUXAiAyQPaE9MNcL8/nRpuu
321 99I1enCSmWIAJ57IwuJ/n1d45Q==
322 -----END CERTIFICATE-----
323 */
324 static const char ECDSACertPEM[] = {
325 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x20, 0x43,
326 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2d, 0x2d,
327 0x2d, 0x2d, 0x2d, 0x0a, 0x4d, 0x49, 0x49, 0x42, 0x58, 0x7a, 0x43, 0x43,
328 0x41, 0x51, 0x61, 0x67, 0x41, 0x77, 0x49, 0x42, 0x41, 0x67, 0x49, 0x4a,
329 0x41, 0x4b, 0x36, 0x2f, 0x59, 0x76, 0x66, 0x2f, 0x61, 0x69, 0x6e, 0x36,
330 0x4d, 0x41, 0x6f, 0x47, 0x43, 0x43, 0x71, 0x47, 0x53, 0x4d, 0x34, 0x39,
331 0x42, 0x41, 0x4d, 0x43, 0x4d, 0x42, 0x49, 0x78, 0x45, 0x44, 0x41, 0x4f,
332 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x6f, 0x4d, 0x0a, 0x42, 0x30, 0x46,
333 0x6a, 0x62, 0x57, 0x55, 0x67, 0x51, 0x32, 0x38, 0x77, 0x48, 0x68, 0x63,
334 0x4e, 0x4d, 0x54, 0x59, 0x78, 0x4d, 0x6a, 0x49, 0x31, 0x4d, 0x54, 0x45,
335 0x7a, 0x4f, 0x54, 0x49, 0x33, 0x57, 0x68, 0x63, 0x4e, 0x4d, 0x6a, 0x59,
336 0x78, 0x4d, 0x6a, 0x49, 0x31, 0x4d, 0x54, 0x45, 0x7a, 0x4f, 0x54, 0x49,
337 0x33, 0x57, 0x6a, 0x41, 0x53, 0x4d, 0x52, 0x41, 0x77, 0x44, 0x67, 0x59,
338 0x44, 0x0a, 0x56, 0x51, 0x51, 0x4b, 0x44, 0x41, 0x64, 0x42, 0x59, 0x32,
339 0x31, 0x6c, 0x49, 0x45, 0x4e, 0x76, 0x4d, 0x46, 0x6b, 0x77, 0x45, 0x77,
340 0x59, 0x48, 0x4b, 0x6f, 0x5a, 0x49, 0x7a, 0x6a, 0x30, 0x43, 0x41, 0x51,
341 0x59, 0x49, 0x4b, 0x6f, 0x5a, 0x49, 0x7a, 0x6a, 0x30, 0x44, 0x41, 0x51,
342 0x63, 0x44, 0x51, 0x67, 0x41, 0x45, 0x64, 0x73, 0x6a, 0x79, 0x67, 0x56,
343 0x59, 0x6a, 0x6a, 0x61, 0x4b, 0x42, 0x0a, 0x46, 0x34, 0x43, 0x4e, 0x45,
344 0x43, 0x56, 0x6c, 0x6c, 0x4e, 0x66, 0x30, 0x31, 0x37, 0x70, 0x35, 0x2f,
345 0x4d, 0x78, 0x4e, 0x53, 0x57, 0x44, 0x6f, 0x54, 0x48, 0x79, 0x39, 0x49,
346 0x32, 0x47, 0x65, 0x44, 0x77, 0x45, 0x44, 0x44, 0x61, 0x7a, 0x49, 0x44,
347 0x2f, 0x78, 0x79, 0x38, 0x4a, 0x69, 0x59, 0x6a, 0x74, 0x50, 0x4b, 0x56,
348 0x45, 0x2f, 0x5a, 0x71, 0x77, 0x62, 0x6d, 0x69, 0x76, 0x70, 0x32, 0x0a,
349 0x55, 0x77, 0x74, 0x48, 0x32, 0x38, 0x61, 0x37, 0x4e, 0x61, 0x4e, 0x46,
350 0x4d, 0x45, 0x4d, 0x77, 0x43, 0x51, 0x59, 0x44, 0x56, 0x52, 0x30, 0x54,
351 0x42, 0x41, 0x49, 0x77, 0x41, 0x44, 0x41, 0x4c, 0x42, 0x67, 0x4e, 0x56,
352 0x48, 0x51, 0x38, 0x45, 0x42, 0x41, 0x4d, 0x43, 0x42, 0x61, 0x41, 0x77,
353 0x45, 0x77, 0x59, 0x44, 0x56, 0x52, 0x30, 0x6c, 0x42, 0x41, 0x77, 0x77,
354 0x43, 0x67, 0x59, 0x49, 0x0a, 0x4b, 0x77, 0x59, 0x42, 0x42, 0x51, 0x55,
355 0x48, 0x41, 0x77, 0x45, 0x77, 0x46, 0x41, 0x59, 0x44, 0x56, 0x52, 0x30,
356 0x52, 0x42, 0x41, 0x30, 0x77, 0x43, 0x34, 0x49, 0x4a, 0x62, 0x47, 0x39,
357 0x6a, 0x59, 0x57, 0x78, 0x6f, 0x62, 0x33, 0x4e, 0x30, 0x4d, 0x41, 0x6f,
358 0x47, 0x43, 0x43, 0x71, 0x47, 0x53, 0x4d, 0x34, 0x39, 0x42, 0x41, 0x4d,
359 0x43, 0x41, 0x30, 0x63, 0x41, 0x4d, 0x45, 0x51, 0x43, 0x0a, 0x49, 0x45,
360 0x7a, 0x72, 0x33, 0x74, 0x2f, 0x6a, 0x65, 0x6a, 0x56, 0x45, 0x39, 0x6f,
361 0x53, 0x6e, 0x42, 0x70, 0x38, 0x63, 0x33, 0x50, 0x32, 0x70, 0x2b, 0x6c,
362 0x44, 0x4c, 0x56, 0x52, 0x72, 0x42, 0x38, 0x7a, 0x78, 0x4c, 0x79, 0x6a,
363 0x5a, 0x76, 0x69, 0x72, 0x55, 0x58, 0x41, 0x69, 0x41, 0x79, 0x51, 0x50,
364 0x61, 0x45, 0x39, 0x4d, 0x4e, 0x63, 0x4c, 0x38, 0x2f, 0x6e, 0x52, 0x70,
365 0x75, 0x75, 0x0a, 0x39, 0x39, 0x49, 0x31, 0x65, 0x6e, 0x43, 0x53, 0x6d,
366 0x57, 0x49, 0x41, 0x4a, 0x35, 0x37, 0x49, 0x77, 0x75, 0x4a, 0x2f, 0x6e,
367 0x31, 0x64, 0x34, 0x35, 0x51, 0x3d, 0x3d, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d,
368 0x2d, 0x45, 0x4e, 0x44, 0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49,
369 0x43, 0x41, 0x54, 0x45, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a
370 };
371 #endif
372
373 #if !defined(OPENSSL_NO_DSA) && !defined(OPENSSL_NO_DEPRECATED_3_0)
374 /*
375 -----BEGIN DSA PRIVATE KEY-----
376 MIIBuwIBAAKBgQDdkFKzNABLOha7Eqj7004+p5fhtR6bxpujToMmSZTYi8igVVXP
377 Wzf03ULKS5UKjA6WpR6EiZAhm+PdxusZ5xfAuRZLdKy0bgxn1f348Rwh+EQNaEM8
378 0TGcnw5ijwKmSw5yyHPDWdiHzoqEBlhAf8Nl22YTXax/clsc/pu/RRLAdwIVAIEg
379 QqWRf/1EIZZcgM65Qpd65YuxAoGBAKBauV/RuloFHoSy5iWXESDywiS380tN5974
380 GukGwoYdZo5uSIH6ahpeNSef0MbHGAzr7ZVEnhCQfRAwH1gRvSHoq/Rbmcvtd3r+
381 QtQHOwvQHgLAynhI4i73c794czHaR+439bmcaSwDnQduRM85Mho/jiiZzAVPxBmG
382 POIMWNXXAoGAI6Ep5IE7yn3JzkXO9B6tC3bbDM+ZzuuInwZLbtZ8lim7Dsqabg4k
383 2YbE4R95Bnfwnjsyl80mq/DbQN5lAHBvjDrkC6ItojBGKI3+iIrqGUEJdxvl4ulj
384 F0PmSD7zvIG8BfocKOel+EHH0YryExiW6krV1KW2ZRmJrqSFw6KCjV0CFFQFbPfU
385 xy5PmKytJmXR8BmppkIO
386 -----END DSA PRIVATE KEY-----
387 */
388 static const char DSAPrivateKeyPEM[] = {
389 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x20, 0x44,
390 0x53, 0x41, 0x20, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x20, 0x4b,
391 0x45, 0x59, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x4d, 0x49, 0x49, 0x42,
392 0x75, 0x77, 0x49, 0x42, 0x41, 0x41, 0x4b, 0x42, 0x67, 0x51, 0x44, 0x64,
393 0x6b, 0x46, 0x4b, 0x7a, 0x4e, 0x41, 0x42, 0x4c, 0x4f, 0x68, 0x61, 0x37,
394 0x45, 0x71, 0x6a, 0x37, 0x30, 0x30, 0x34, 0x2b, 0x70, 0x35, 0x66, 0x68,
395 0x74, 0x52, 0x36, 0x62, 0x78, 0x70, 0x75, 0x6a, 0x54, 0x6f, 0x4d, 0x6d,
396 0x53, 0x5a, 0x54, 0x59, 0x69, 0x38, 0x69, 0x67, 0x56, 0x56, 0x58, 0x50,
397 0x0a, 0x57, 0x7a, 0x66, 0x30, 0x33, 0x55, 0x4c, 0x4b, 0x53, 0x35, 0x55,
398 0x4b, 0x6a, 0x41, 0x36, 0x57, 0x70, 0x52, 0x36, 0x45, 0x69, 0x5a, 0x41,
399 0x68, 0x6d, 0x2b, 0x50, 0x64, 0x78, 0x75, 0x73, 0x5a, 0x35, 0x78, 0x66,
400 0x41, 0x75, 0x52, 0x5a, 0x4c, 0x64, 0x4b, 0x79, 0x30, 0x62, 0x67, 0x78,
401 0x6e, 0x31, 0x66, 0x33, 0x34, 0x38, 0x52, 0x77, 0x68, 0x2b, 0x45, 0x51,
402 0x4e, 0x61, 0x45, 0x4d, 0x38, 0x0a, 0x30, 0x54, 0x47, 0x63, 0x6e, 0x77,
403 0x35, 0x69, 0x6a, 0x77, 0x4b, 0x6d, 0x53, 0x77, 0x35, 0x79, 0x79, 0x48,
404 0x50, 0x44, 0x57, 0x64, 0x69, 0x48, 0x7a, 0x6f, 0x71, 0x45, 0x42, 0x6c,
405 0x68, 0x41, 0x66, 0x38, 0x4e, 0x6c, 0x32, 0x32, 0x59, 0x54, 0x58, 0x61,
406 0x78, 0x2f, 0x63, 0x6c, 0x73, 0x63, 0x2f, 0x70, 0x75, 0x2f, 0x52, 0x52,
407 0x4c, 0x41, 0x64, 0x77, 0x49, 0x56, 0x41, 0x49, 0x45, 0x67, 0x0a, 0x51,
408 0x71, 0x57, 0x52, 0x66, 0x2f, 0x31, 0x45, 0x49, 0x5a, 0x5a, 0x63, 0x67,
409 0x4d, 0x36, 0x35, 0x51, 0x70, 0x64, 0x36, 0x35, 0x59, 0x75, 0x78, 0x41,
410 0x6f, 0x47, 0x42, 0x41, 0x4b, 0x42, 0x61, 0x75, 0x56, 0x2f, 0x52, 0x75,
411 0x6c, 0x6f, 0x46, 0x48, 0x6f, 0x53, 0x79, 0x35, 0x69, 0x57, 0x58, 0x45,
412 0x53, 0x44, 0x79, 0x77, 0x69, 0x53, 0x33, 0x38, 0x30, 0x74, 0x4e, 0x35,
413 0x39, 0x37, 0x34, 0x0a, 0x47, 0x75, 0x6b, 0x47, 0x77, 0x6f, 0x59, 0x64,
414 0x5a, 0x6f, 0x35, 0x75, 0x53, 0x49, 0x48, 0x36, 0x61, 0x68, 0x70, 0x65,
415 0x4e, 0x53, 0x65, 0x66, 0x30, 0x4d, 0x62, 0x48, 0x47, 0x41, 0x7a, 0x72,
416 0x37, 0x5a, 0x56, 0x45, 0x6e, 0x68, 0x43, 0x51, 0x66, 0x52, 0x41, 0x77,
417 0x48, 0x31, 0x67, 0x52, 0x76, 0x53, 0x48, 0x6f, 0x71, 0x2f, 0x52, 0x62,
418 0x6d, 0x63, 0x76, 0x74, 0x64, 0x33, 0x72, 0x2b, 0x0a, 0x51, 0x74, 0x51,
419 0x48, 0x4f, 0x77, 0x76, 0x51, 0x48, 0x67, 0x4c, 0x41, 0x79, 0x6e, 0x68,
420 0x49, 0x34, 0x69, 0x37, 0x33, 0x63, 0x37, 0x39, 0x34, 0x63, 0x7a, 0x48,
421 0x61, 0x52, 0x2b, 0x34, 0x33, 0x39, 0x62, 0x6d, 0x63, 0x61, 0x53, 0x77,
422 0x44, 0x6e, 0x51, 0x64, 0x75, 0x52, 0x4d, 0x38, 0x35, 0x4d, 0x68, 0x6f,
423 0x2f, 0x6a, 0x69, 0x69, 0x5a, 0x7a, 0x41, 0x56, 0x50, 0x78, 0x42, 0x6d,
424 0x47, 0x0a, 0x50, 0x4f, 0x49, 0x4d, 0x57, 0x4e, 0x58, 0x58, 0x41, 0x6f,
425 0x47, 0x41, 0x49, 0x36, 0x45, 0x70, 0x35, 0x49, 0x45, 0x37, 0x79, 0x6e,
426 0x33, 0x4a, 0x7a, 0x6b, 0x58, 0x4f, 0x39, 0x42, 0x36, 0x74, 0x43, 0x33,
427 0x62, 0x62, 0x44, 0x4d, 0x2b, 0x5a, 0x7a, 0x75, 0x75, 0x49, 0x6e, 0x77,
428 0x5a, 0x4c, 0x62, 0x74, 0x5a, 0x38, 0x6c, 0x69, 0x6d, 0x37, 0x44, 0x73,
429 0x71, 0x61, 0x62, 0x67, 0x34, 0x6b, 0x0a, 0x32, 0x59, 0x62, 0x45, 0x34,
430 0x52, 0x39, 0x35, 0x42, 0x6e, 0x66, 0x77, 0x6e, 0x6a, 0x73, 0x79, 0x6c,
431 0x38, 0x30, 0x6d, 0x71, 0x2f, 0x44, 0x62, 0x51, 0x4e, 0x35, 0x6c, 0x41,
432 0x48, 0x42, 0x76, 0x6a, 0x44, 0x72, 0x6b, 0x43, 0x36, 0x49, 0x74, 0x6f,
433 0x6a, 0x42, 0x47, 0x4b, 0x49, 0x33, 0x2b, 0x69, 0x49, 0x72, 0x71, 0x47,
434 0x55, 0x45, 0x4a, 0x64, 0x78, 0x76, 0x6c, 0x34, 0x75, 0x6c, 0x6a, 0x0a,
435 0x46, 0x30, 0x50, 0x6d, 0x53, 0x44, 0x37, 0x7a, 0x76, 0x49, 0x47, 0x38,
436 0x42, 0x66, 0x6f, 0x63, 0x4b, 0x4f, 0x65, 0x6c, 0x2b, 0x45, 0x48, 0x48,
437 0x30, 0x59, 0x72, 0x79, 0x45, 0x78, 0x69, 0x57, 0x36, 0x6b, 0x72, 0x56,
438 0x31, 0x4b, 0x57, 0x32, 0x5a, 0x52, 0x6d, 0x4a, 0x72, 0x71, 0x53, 0x46,
439 0x77, 0x36, 0x4b, 0x43, 0x6a, 0x56, 0x30, 0x43, 0x46, 0x46, 0x51, 0x46,
440 0x62, 0x50, 0x66, 0x55, 0x0a, 0x78, 0x79, 0x35, 0x50, 0x6d, 0x4b, 0x79,
441 0x74, 0x4a, 0x6d, 0x58, 0x52, 0x38, 0x42, 0x6d, 0x70, 0x70, 0x6b, 0x49,
442 0x4f, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x45, 0x4e, 0x44, 0x20, 0x44,
443 0x53, 0x41, 0x20, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x20, 0x4b,
444 0x45, 0x59, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a
445 };
446
447 /*
448 -----BEGIN CERTIFICATE-----
449 MIICqTCCAmegAwIBAgIJAILDGUk37fWGMAsGCWCGSAFlAwQDAjASMRAwDgYDVQQK
450 DAdBY21lIENvMB4XDTE2MTIyNTEzMjUzNloXDTI2MTIyNTEzMjUzNlowEjEQMA4G
451 A1UECgwHQWNtZSBDbzCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQDdkFKzNABLOha7
452 Eqj7004+p5fhtR6bxpujToMmSZTYi8igVVXPWzf03ULKS5UKjA6WpR6EiZAhm+Pd
453 xusZ5xfAuRZLdKy0bgxn1f348Rwh+EQNaEM80TGcnw5ijwKmSw5yyHPDWdiHzoqE
454 BlhAf8Nl22YTXax/clsc/pu/RRLAdwIVAIEgQqWRf/1EIZZcgM65Qpd65YuxAoGB
455 AKBauV/RuloFHoSy5iWXESDywiS380tN5974GukGwoYdZo5uSIH6ahpeNSef0MbH
456 GAzr7ZVEnhCQfRAwH1gRvSHoq/Rbmcvtd3r+QtQHOwvQHgLAynhI4i73c794czHa
457 R+439bmcaSwDnQduRM85Mho/jiiZzAVPxBmGPOIMWNXXA4GEAAKBgCOhKeSBO8p9
458 yc5FzvQerQt22wzPmc7riJ8GS27WfJYpuw7Kmm4OJNmGxOEfeQZ38J47MpfNJqvw
459 20DeZQBwb4w65AuiLaIwRiiN/oiK6hlBCXcb5eLpYxdD5kg+87yBvAX6HCjnpfhB
460 x9GK8hMYlupK1dSltmUZia6khcOigo1do0UwQzAJBgNVHRMEAjAAMAsGA1UdDwQE
461 AwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATAUBgNVHREEDTALgglsb2NhbGhvc3Qw
462 CwYJYIZIAWUDBAMCAy8AMCwCFClxInXTRWNJEWdi5ilNr/fbM1bKAhQy4B7wtmfd
463 I+zV6g3w9qBkNqStpA==
464 -----END CERTIFICATE-----
465 */
466 static const char DSACertPEM[] = {
467 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x20, 0x43,
468 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2d, 0x2d,
469 0x2d, 0x2d, 0x2d, 0x0a, 0x4d, 0x49, 0x49, 0x43, 0x71, 0x54, 0x43, 0x43,
470 0x41, 0x6d, 0x65, 0x67, 0x41, 0x77, 0x49, 0x42, 0x41, 0x67, 0x49, 0x4a,
471 0x41, 0x49, 0x4c, 0x44, 0x47, 0x55, 0x6b, 0x33, 0x37, 0x66, 0x57, 0x47,
472 0x4d, 0x41, 0x73, 0x47, 0x43, 0x57, 0x43, 0x47, 0x53, 0x41, 0x46, 0x6c,
473 0x41, 0x77, 0x51, 0x44, 0x41, 0x6a, 0x41, 0x53, 0x4d, 0x52, 0x41, 0x77,
474 0x44, 0x67, 0x59, 0x44, 0x56, 0x51, 0x51, 0x4b, 0x0a, 0x44, 0x41, 0x64,
475 0x42, 0x59, 0x32, 0x31, 0x6c, 0x49, 0x45, 0x4e, 0x76, 0x4d, 0x42, 0x34,
476 0x58, 0x44, 0x54, 0x45, 0x32, 0x4d, 0x54, 0x49, 0x79, 0x4e, 0x54, 0x45,
477 0x7a, 0x4d, 0x6a, 0x55, 0x7a, 0x4e, 0x6c, 0x6f, 0x58, 0x44, 0x54, 0x49,
478 0x32, 0x4d, 0x54, 0x49, 0x79, 0x4e, 0x54, 0x45, 0x7a, 0x4d, 0x6a, 0x55,
479 0x7a, 0x4e, 0x6c, 0x6f, 0x77, 0x45, 0x6a, 0x45, 0x51, 0x4d, 0x41, 0x34,
480 0x47, 0x0a, 0x41, 0x31, 0x55, 0x45, 0x43, 0x67, 0x77, 0x48, 0x51, 0x57,
481 0x4e, 0x74, 0x5a, 0x53, 0x42, 0x44, 0x62, 0x7a, 0x43, 0x43, 0x41, 0x62,
482 0x63, 0x77, 0x67, 0x67, 0x45, 0x73, 0x42, 0x67, 0x63, 0x71, 0x68, 0x6b,
483 0x6a, 0x4f, 0x4f, 0x41, 0x51, 0x42, 0x4d, 0x49, 0x49, 0x42, 0x48, 0x77,
484 0x4b, 0x42, 0x67, 0x51, 0x44, 0x64, 0x6b, 0x46, 0x4b, 0x7a, 0x4e, 0x41,
485 0x42, 0x4c, 0x4f, 0x68, 0x61, 0x37, 0x0a, 0x45, 0x71, 0x6a, 0x37, 0x30,
486 0x30, 0x34, 0x2b, 0x70, 0x35, 0x66, 0x68, 0x74, 0x52, 0x36, 0x62, 0x78,
487 0x70, 0x75, 0x6a, 0x54, 0x6f, 0x4d, 0x6d, 0x53, 0x5a, 0x54, 0x59, 0x69,
488 0x38, 0x69, 0x67, 0x56, 0x56, 0x58, 0x50, 0x57, 0x7a, 0x66, 0x30, 0x33,
489 0x55, 0x4c, 0x4b, 0x53, 0x35, 0x55, 0x4b, 0x6a, 0x41, 0x36, 0x57, 0x70,
490 0x52, 0x36, 0x45, 0x69, 0x5a, 0x41, 0x68, 0x6d, 0x2b, 0x50, 0x64, 0x0a,
491 0x78, 0x75, 0x73, 0x5a, 0x35, 0x78, 0x66, 0x41, 0x75, 0x52, 0x5a, 0x4c,
492 0x64, 0x4b, 0x79, 0x30, 0x62, 0x67, 0x78, 0x6e, 0x31, 0x66, 0x33, 0x34,
493 0x38, 0x52, 0x77, 0x68, 0x2b, 0x45, 0x51, 0x4e, 0x61, 0x45, 0x4d, 0x38,
494 0x30, 0x54, 0x47, 0x63, 0x6e, 0x77, 0x35, 0x69, 0x6a, 0x77, 0x4b, 0x6d,
495 0x53, 0x77, 0x35, 0x79, 0x79, 0x48, 0x50, 0x44, 0x57, 0x64, 0x69, 0x48,
496 0x7a, 0x6f, 0x71, 0x45, 0x0a, 0x42, 0x6c, 0x68, 0x41, 0x66, 0x38, 0x4e,
497 0x6c, 0x32, 0x32, 0x59, 0x54, 0x58, 0x61, 0x78, 0x2f, 0x63, 0x6c, 0x73,
498 0x63, 0x2f, 0x70, 0x75, 0x2f, 0x52, 0x52, 0x4c, 0x41, 0x64, 0x77, 0x49,
499 0x56, 0x41, 0x49, 0x45, 0x67, 0x51, 0x71, 0x57, 0x52, 0x66, 0x2f, 0x31,
500 0x45, 0x49, 0x5a, 0x5a, 0x63, 0x67, 0x4d, 0x36, 0x35, 0x51, 0x70, 0x64,
501 0x36, 0x35, 0x59, 0x75, 0x78, 0x41, 0x6f, 0x47, 0x42, 0x0a, 0x41, 0x4b,
502 0x42, 0x61, 0x75, 0x56, 0x2f, 0x52, 0x75, 0x6c, 0x6f, 0x46, 0x48, 0x6f,
503 0x53, 0x79, 0x35, 0x69, 0x57, 0x58, 0x45, 0x53, 0x44, 0x79, 0x77, 0x69,
504 0x53, 0x33, 0x38, 0x30, 0x74, 0x4e, 0x35, 0x39, 0x37, 0x34, 0x47, 0x75,
505 0x6b, 0x47, 0x77, 0x6f, 0x59, 0x64, 0x5a, 0x6f, 0x35, 0x75, 0x53, 0x49,
506 0x48, 0x36, 0x61, 0x68, 0x70, 0x65, 0x4e, 0x53, 0x65, 0x66, 0x30, 0x4d,
507 0x62, 0x48, 0x0a, 0x47, 0x41, 0x7a, 0x72, 0x37, 0x5a, 0x56, 0x45, 0x6e,
508 0x68, 0x43, 0x51, 0x66, 0x52, 0x41, 0x77, 0x48, 0x31, 0x67, 0x52, 0x76,
509 0x53, 0x48, 0x6f, 0x71, 0x2f, 0x52, 0x62, 0x6d, 0x63, 0x76, 0x74, 0x64,
510 0x33, 0x72, 0x2b, 0x51, 0x74, 0x51, 0x48, 0x4f, 0x77, 0x76, 0x51, 0x48,
511 0x67, 0x4c, 0x41, 0x79, 0x6e, 0x68, 0x49, 0x34, 0x69, 0x37, 0x33, 0x63,
512 0x37, 0x39, 0x34, 0x63, 0x7a, 0x48, 0x61, 0x0a, 0x52, 0x2b, 0x34, 0x33,
513 0x39, 0x62, 0x6d, 0x63, 0x61, 0x53, 0x77, 0x44, 0x6e, 0x51, 0x64, 0x75,
514 0x52, 0x4d, 0x38, 0x35, 0x4d, 0x68, 0x6f, 0x2f, 0x6a, 0x69, 0x69, 0x5a,
515 0x7a, 0x41, 0x56, 0x50, 0x78, 0x42, 0x6d, 0x47, 0x50, 0x4f, 0x49, 0x4d,
516 0x57, 0x4e, 0x58, 0x58, 0x41, 0x34, 0x47, 0x45, 0x41, 0x41, 0x4b, 0x42,
517 0x67, 0x43, 0x4f, 0x68, 0x4b, 0x65, 0x53, 0x42, 0x4f, 0x38, 0x70, 0x39,
518 0x0a, 0x79, 0x63, 0x35, 0x46, 0x7a, 0x76, 0x51, 0x65, 0x72, 0x51, 0x74,
519 0x32, 0x32, 0x77, 0x7a, 0x50, 0x6d, 0x63, 0x37, 0x72, 0x69, 0x4a, 0x38,
520 0x47, 0x53, 0x32, 0x37, 0x57, 0x66, 0x4a, 0x59, 0x70, 0x75, 0x77, 0x37,
521 0x4b, 0x6d, 0x6d, 0x34, 0x4f, 0x4a, 0x4e, 0x6d, 0x47, 0x78, 0x4f, 0x45,
522 0x66, 0x65, 0x51, 0x5a, 0x33, 0x38, 0x4a, 0x34, 0x37, 0x4d, 0x70, 0x66,
523 0x4e, 0x4a, 0x71, 0x76, 0x77, 0x0a, 0x32, 0x30, 0x44, 0x65, 0x5a, 0x51,
524 0x42, 0x77, 0x62, 0x34, 0x77, 0x36, 0x35, 0x41, 0x75, 0x69, 0x4c, 0x61,
525 0x49, 0x77, 0x52, 0x69, 0x69, 0x4e, 0x2f, 0x6f, 0x69, 0x4b, 0x36, 0x68,
526 0x6c, 0x42, 0x43, 0x58, 0x63, 0x62, 0x35, 0x65, 0x4c, 0x70, 0x59, 0x78,
527 0x64, 0x44, 0x35, 0x6b, 0x67, 0x2b, 0x38, 0x37, 0x79, 0x42, 0x76, 0x41,
528 0x58, 0x36, 0x48, 0x43, 0x6a, 0x6e, 0x70, 0x66, 0x68, 0x42, 0x0a, 0x78,
529 0x39, 0x47, 0x4b, 0x38, 0x68, 0x4d, 0x59, 0x6c, 0x75, 0x70, 0x4b, 0x31,
530 0x64, 0x53, 0x6c, 0x74, 0x6d, 0x55, 0x5a, 0x69, 0x61, 0x36, 0x6b, 0x68,
531 0x63, 0x4f, 0x69, 0x67, 0x6f, 0x31, 0x64, 0x6f, 0x30, 0x55, 0x77, 0x51,
532 0x7a, 0x41, 0x4a, 0x42, 0x67, 0x4e, 0x56, 0x48, 0x52, 0x4d, 0x45, 0x41,
533 0x6a, 0x41, 0x41, 0x4d, 0x41, 0x73, 0x47, 0x41, 0x31, 0x55, 0x64, 0x44,
534 0x77, 0x51, 0x45, 0x0a, 0x41, 0x77, 0x49, 0x46, 0x6f, 0x44, 0x41, 0x54,
535 0x42, 0x67, 0x4e, 0x56, 0x48, 0x53, 0x55, 0x45, 0x44, 0x44, 0x41, 0x4b,
536 0x42, 0x67, 0x67, 0x72, 0x42, 0x67, 0x45, 0x46, 0x42, 0x51, 0x63, 0x44,
537 0x41, 0x54, 0x41, 0x55, 0x42, 0x67, 0x4e, 0x56, 0x48, 0x52, 0x45, 0x45,
538 0x44, 0x54, 0x41, 0x4c, 0x67, 0x67, 0x6c, 0x73, 0x62, 0x32, 0x4e, 0x68,
539 0x62, 0x47, 0x68, 0x76, 0x63, 0x33, 0x51, 0x77, 0x0a, 0x43, 0x77, 0x59,
540 0x4a, 0x59, 0x49, 0x5a, 0x49, 0x41, 0x57, 0x55, 0x44, 0x42, 0x41, 0x4d,
541 0x43, 0x41, 0x79, 0x38, 0x41, 0x4d, 0x43, 0x77, 0x43, 0x46, 0x43, 0x6c,
542 0x78, 0x49, 0x6e, 0x58, 0x54, 0x52, 0x57, 0x4e, 0x4a, 0x45, 0x57, 0x64,
543 0x69, 0x35, 0x69, 0x6c, 0x4e, 0x72, 0x2f, 0x66, 0x62, 0x4d, 0x31, 0x62,
544 0x4b, 0x41, 0x68, 0x51, 0x79, 0x34, 0x42, 0x37, 0x77, 0x74, 0x6d, 0x66,
545 0x64, 0x0a, 0x49, 0x2b, 0x7a, 0x56, 0x36, 0x67, 0x33, 0x77, 0x39, 0x71,
546 0x42, 0x6b, 0x4e, 0x71, 0x53, 0x74, 0x70, 0x41, 0x3d, 0x3d, 0x0a, 0x2d,
547 0x2d, 0x2d, 0x2d, 0x2d, 0x45, 0x4e, 0x44, 0x20, 0x43, 0x45, 0x52, 0x54,
548 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
549 0x0a
550 };
551 #endif
552
553 /* unused, to avoid warning. */
554 static int idx;
555
556 #define FUZZTIME 1485898104
557
558 #define TIME_IMPL(t) { if (t != NULL) *t = FUZZTIME; return FUZZTIME; }
559
560 /*
561 * This might not work in all cases (and definitely not on Windows
562 * because of the way linkers are) and callees can still get the
563 * current time instead of the fixed time. This will just result
564 * in things not being fully reproducible and have a slightly
565 * different coverage.
566 */
567 #if !defined(_WIN32)
time(time_t * t)568 time_t time(time_t *t) TIME_IMPL(t)
569 #endif
570
571 int FuzzerInitialize(int *argc, char ***argv)
572 {
573 STACK_OF(SSL_COMP) *comp_methods;
574
575 FuzzerSetRand();
576 OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS | OPENSSL_INIT_ASYNC, NULL);
577 OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, NULL);
578 ERR_clear_error();
579 CRYPTO_free_ex_index(0, -1);
580 idx = SSL_get_ex_data_X509_STORE_CTX_idx();
581 comp_methods = SSL_COMP_get_compression_methods();
582 if (comp_methods != NULL)
583 sk_SSL_COMP_sort(comp_methods);
584
585 return 1;
586 }
587
FuzzerTestOneInput(const uint8_t * buf,size_t len)588 int FuzzerTestOneInput(const uint8_t *buf, size_t len)
589 {
590 SSL *server;
591 BIO *in;
592 BIO *out;
593 #if !defined(OPENSSL_NO_EC) \
594 || (!defined(OPENSSL_NO_DSA) && !defined(OPENSSL_NO_DEPRECATED_3_0))
595 BIO *bio_buf;
596 #endif
597 SSL_CTX *ctx;
598 int ret;
599 #ifndef OPENSSL_NO_DEPRECATED_3_0
600 RSA *privkey;
601 #endif
602 #if !defined(OPENSSL_NO_DEPRECATED_3_0)
603 EVP_PKEY *pkey;
604 #endif
605 X509 *cert;
606 #ifndef OPENSSL_NO_DEPRECATED_3_0
607 # ifndef OPENSSL_NO_EC
608 EC_KEY *ecdsakey = NULL;
609 # endif
610 #endif
611 #if !defined(OPENSSL_NO_DSA) && !defined(OPENSSL_NO_DEPRECATED_3_0)
612 DSA *dsakey = NULL;
613 #endif
614
615 if (len < 2)
616 return 0;
617
618 /* This only fuzzes the initial flow from the client so far. */
619 ctx = SSL_CTX_new(DTLS_server_method());
620
621 ret = SSL_CTX_set_min_proto_version(ctx, 0);
622 OPENSSL_assert(ret == 1);
623 ret = SSL_CTX_set_cipher_list(ctx, "ALL:eNULL:@SECLEVEL=0");
624 OPENSSL_assert(ret == 1);
625
626 #ifndef OPENSSL_NO_DEPRECATED_3_0
627 /* RSA */
628 bio_buf = BIO_new(BIO_s_mem());
629 OPENSSL_assert((size_t)BIO_write(bio_buf, RSAPrivateKeyPEM, sizeof(RSAPrivateKeyPEM)) == sizeof(RSAPrivateKeyPEM));
630 privkey = PEM_read_bio_RSAPrivateKey(bio_buf, NULL, NULL, NULL);
631 ERR_print_errors_fp(stderr);
632 OPENSSL_assert(privkey != NULL);
633 BIO_free(bio_buf);
634 pkey = EVP_PKEY_new();
635 EVP_PKEY_assign_RSA(pkey, privkey);
636 ret = SSL_CTX_use_PrivateKey(ctx, pkey);
637 OPENSSL_assert(ret == 1);
638 EVP_PKEY_free(pkey);
639 #endif
640
641 bio_buf = BIO_new(BIO_s_mem());
642 OPENSSL_assert((size_t)BIO_write(bio_buf, RSACertificatePEM, sizeof(RSACertificatePEM)) == sizeof(RSACertificatePEM));
643 cert = PEM_read_bio_X509(bio_buf, NULL, NULL, NULL);
644 BIO_free(bio_buf);
645 OPENSSL_assert(cert != NULL);
646 ret = SSL_CTX_use_certificate(ctx, cert);
647 OPENSSL_assert(ret == 1);
648 X509_free(cert);
649
650 #ifndef OPENSSL_NO_EC
651 # ifndef OPENSSL_NO_DEPRECATED_3_0
652 /* ECDSA */
653 bio_buf = BIO_new(BIO_s_mem());
654 OPENSSL_assert((size_t)BIO_write(bio_buf, ECDSAPrivateKeyPEM, sizeof(ECDSAPrivateKeyPEM)) == sizeof(ECDSAPrivateKeyPEM));
655 ecdsakey = PEM_read_bio_ECPrivateKey(bio_buf, NULL, NULL, NULL);
656 ERR_print_errors_fp(stderr);
657 OPENSSL_assert(ecdsakey != NULL);
658 BIO_free(bio_buf);
659 pkey = EVP_PKEY_new();
660 EVP_PKEY_assign_EC_KEY(pkey, ecdsakey);
661 ret = SSL_CTX_use_PrivateKey(ctx, pkey);
662 OPENSSL_assert(ret == 1);
663 EVP_PKEY_free(pkey);
664 # endif
665 bio_buf = BIO_new(BIO_s_mem());
666 OPENSSL_assert((size_t)BIO_write(bio_buf, ECDSACertPEM, sizeof(ECDSACertPEM)) == sizeof(ECDSACertPEM));
667 cert = PEM_read_bio_X509(bio_buf, NULL, NULL, NULL);
668 OPENSSL_assert(cert != NULL);
669 BIO_free(bio_buf);
670 ret = SSL_CTX_use_certificate(ctx, cert);
671 OPENSSL_assert(ret == 1);
672 X509_free(cert);
673 #endif
674
675 #if !defined(OPENSSL_NO_DSA) && !defined(OPENSSL_NO_DEPRECATED_3_0)
676 /* DSA */
677 bio_buf = BIO_new(BIO_s_mem());
678 OPENSSL_assert((size_t)BIO_write(bio_buf, DSAPrivateKeyPEM, sizeof(DSAPrivateKeyPEM)) == sizeof(DSAPrivateKeyPEM));
679 dsakey = PEM_read_bio_DSAPrivateKey(bio_buf, NULL, NULL, NULL);
680 ERR_print_errors_fp(stderr);
681 OPENSSL_assert(dsakey != NULL);
682 BIO_free(bio_buf);
683 pkey = EVP_PKEY_new();
684 EVP_PKEY_assign_DSA(pkey, dsakey);
685 ret = SSL_CTX_use_PrivateKey(ctx, pkey);
686 OPENSSL_assert(ret == 1);
687 EVP_PKEY_free(pkey);
688
689 bio_buf = BIO_new(BIO_s_mem());
690 OPENSSL_assert((size_t)BIO_write(bio_buf, DSACertPEM, sizeof(DSACertPEM)) == sizeof(DSACertPEM));
691 cert = PEM_read_bio_X509(bio_buf, NULL, NULL, NULL);
692 OPENSSL_assert(cert != NULL);
693 BIO_free(bio_buf);
694 ret = SSL_CTX_use_certificate(ctx, cert);
695 OPENSSL_assert(ret == 1);
696 X509_free(cert);
697 #endif
698
699 server = SSL_new(ctx);
700 in = BIO_new(BIO_s_mem());
701 out = BIO_new(BIO_s_mem());
702 SSL_set_bio(server, in, out);
703 SSL_set_accept_state(server);
704
705 OPENSSL_assert((size_t)BIO_write(in, buf, len) == len);
706
707 if (SSL_do_handshake(server) == 1) {
708 /* Keep reading application data until error or EOF. */
709 uint8_t tmp[1024];
710 for (;;) {
711 if (SSL_read(server, tmp, sizeof(tmp)) <= 0) {
712 break;
713 }
714 }
715 }
716 SSL_free(server);
717 ERR_clear_error();
718 SSL_CTX_free(ctx);
719
720 return 0;
721 }
722
FuzzerCleanup(void)723 void FuzzerCleanup(void)
724 {
725 FuzzerClearRand();
726 }
727