dtlsserver.c 44 KB

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