1 /* 2 * X.509 test certificates 3 * 4 * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved 5 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 6 * 7 * This file is provided under the Apache License 2.0, or the 8 * GNU General Public License v2.0 or later. 9 * 10 * ********** 11 * Apache License 2.0: 12 * 13 * Licensed under the Apache License, Version 2.0 (the "License"); you may 14 * not use this file except in compliance with the License. 15 * You may obtain a copy of the License at 16 * 17 * http://www.apache.org/licenses/LICENSE-2.0 18 * 19 * Unless required by applicable law or agreed to in writing, software 20 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 21 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 * See the License for the specific language governing permissions and 23 * limitations under the License. 24 * 25 * ********** 26 * 27 * ********** 28 * GNU General Public License v2.0 or later: 29 * 30 * This program is free software; you can redistribute it and/or modify 31 * it under the terms of the GNU General Public License as published by 32 * the Free Software Foundation; either version 2 of the License, or 33 * (at your option) any later version. 34 * 35 * This program is distributed in the hope that it will be useful, 36 * but WITHOUT ANY WARRANTY; without even the implied warranty of 37 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 38 * GNU General Public License for more details. 39 * 40 * You should have received a copy of the GNU General Public License along 41 * with this program; if not, write to the Free Software Foundation, Inc., 42 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 43 * 44 * ********** 45 * 46 * This file is part of mbed TLS (https://tls.mbed.org) 47 */ 48 49 #if !defined(MBEDTLS_CONFIG_FILE) 50 #include "mbedtls/config.h" 51 #else 52 #include MBEDTLS_CONFIG_FILE 53 #endif 54 55 #include "mbedtls/certs.h" 56 57 #if defined(MBEDTLS_CERTS_C) 58 59 #if defined(MBEDTLS_ECDSA_C) 60 #define TEST_CA_CRT_EC \ 61 "-----BEGIN CERTIFICATE-----\r\n" \ 62 "MIICUjCCAdegAwIBAgIJAMFD4n5iQ8zoMAoGCCqGSM49BAMCMD4xCzAJBgNVBAYT\r\n" \ 63 "Ak5MMREwDwYDVQQKEwhQb2xhclNTTDEcMBoGA1UEAxMTUG9sYXJzc2wgVGVzdCBF\r\n" \ 64 "QyBDQTAeFw0xMzA5MjQxNTQ5NDhaFw0yMzA5MjIxNTQ5NDhaMD4xCzAJBgNVBAYT\r\n" \ 65 "Ak5MMREwDwYDVQQKEwhQb2xhclNTTDEcMBoGA1UEAxMTUG9sYXJzc2wgVGVzdCBF\r\n" \ 66 "QyBDQTB2MBAGByqGSM49AgEGBSuBBAAiA2IABMPaKzRBN1gvh1b+/Im6KUNLTuBu\r\n" \ 67 "ww5XUzM5WNRStJGVOQsj318XJGJI/BqVKc4sLYfCiFKAr9ZqqyHduNMcbli4yuiy\r\n" \ 68 "aY7zQa0pw7RfdadHb9UZKVVpmlM7ILRmFmAzHqOBoDCBnTAdBgNVHQ4EFgQUnW0g\r\n" \ 69 "JEkBPyvLeLUZvH4kydv7NnwwbgYDVR0jBGcwZYAUnW0gJEkBPyvLeLUZvH4kydv7\r\n" \ 70 "NnyhQqRAMD4xCzAJBgNVBAYTAk5MMREwDwYDVQQKEwhQb2xhclNTTDEcMBoGA1UE\r\n" \ 71 "AxMTUG9sYXJzc2wgVGVzdCBFQyBDQYIJAMFD4n5iQ8zoMAwGA1UdEwQFMAMBAf8w\r\n" \ 72 "CgYIKoZIzj0EAwIDaQAwZgIxAMO0YnNWKJUAfXgSJtJxexn4ipg+kv4znuR50v56\r\n" \ 73 "t4d0PCu412mUC6Nnd7izvtE2MgIxAP1nnJQjZ8BWukszFQDG48wxCCyci9qpdSMv\r\n" \ 74 "uCjn8pwUOkABXK8Mss90fzCfCEOtIA==\r\n" \ 75 "-----END CERTIFICATE-----\r\n" 76 const char mbedtls_test_ca_crt_ec[] = TEST_CA_CRT_EC; 77 const size_t mbedtls_test_ca_crt_ec_len = sizeof( mbedtls_test_ca_crt_ec ); 78 79 const char mbedtls_test_ca_key_ec[] = 80 "-----BEGIN EC PRIVATE KEY-----\r\n" 81 "Proc-Type: 4,ENCRYPTED\r\n" 82 "DEK-Info: DES-EDE3-CBC,307EAB469933D64E\r\n" 83 "\r\n" 84 "IxbrRmKcAzctJqPdTQLA4SWyBYYGYJVkYEna+F7Pa5t5Yg/gKADrFKcm6B72e7DG\r\n" 85 "ihExtZI648s0zdYw6qSJ74vrPSuWDe5qm93BqsfVH9svtCzWHW0pm1p0KTBCFfUq\r\n" 86 "UsuWTITwJImcnlAs1gaRZ3sAWm7cOUidL0fo2G0fYUFNcYoCSLffCFTEHBuPnagb\r\n" 87 "a77x/sY1Bvii8S9/XhDTb6pTMx06wzrm\r\n" 88 "-----END EC PRIVATE KEY-----\r\n"; 89 const size_t mbedtls_test_ca_key_ec_len = sizeof( mbedtls_test_ca_key_ec ); 90 91 const char mbedtls_test_ca_pwd_ec[] = "PolarSSLTest"; 92 const size_t mbedtls_test_ca_pwd_ec_len = sizeof( mbedtls_test_ca_pwd_ec ) - 1; 93 94 const char mbedtls_test_srv_crt_ec[] = 95 "-----BEGIN CERTIFICATE-----\r\n" 96 "MIICHzCCAaWgAwIBAgIBCTAKBggqhkjOPQQDAjA+MQswCQYDVQQGEwJOTDERMA8G\r\n" 97 "A1UEChMIUG9sYXJTU0wxHDAaBgNVBAMTE1BvbGFyc3NsIFRlc3QgRUMgQ0EwHhcN\r\n" 98 "MTMwOTI0MTU1MjA0WhcNMjMwOTIyMTU1MjA0WjA0MQswCQYDVQQGEwJOTDERMA8G\r\n" 99 "A1UEChMIUG9sYXJTU0wxEjAQBgNVBAMTCWxvY2FsaG9zdDBZMBMGByqGSM49AgEG\r\n" 100 "CCqGSM49AwEHA0IABDfMVtl2CR5acj7HWS3/IG7ufPkGkXTQrRS192giWWKSTuUA\r\n" 101 "2CMR/+ov0jRdXRa9iojCa3cNVc2KKg76Aci07f+jgZ0wgZowCQYDVR0TBAIwADAd\r\n" 102 "BgNVHQ4EFgQUUGGlj9QH2deCAQzlZX+MY0anE74wbgYDVR0jBGcwZYAUnW0gJEkB\r\n" 103 "PyvLeLUZvH4kydv7NnyhQqRAMD4xCzAJBgNVBAYTAk5MMREwDwYDVQQKEwhQb2xh\r\n" 104 "clNTTDEcMBoGA1UEAxMTUG9sYXJzc2wgVGVzdCBFQyBDQYIJAMFD4n5iQ8zoMAoG\r\n" 105 "CCqGSM49BAMCA2gAMGUCMQCaLFzXptui5WQN8LlO3ddh1hMxx6tzgLvT03MTVK2S\r\n" 106 "C12r0Lz3ri/moSEpNZWqPjkCMCE2f53GXcYLqyfyJR078c/xNSUU5+Xxl7VZ414V\r\n" 107 "fGa5kHvHARBPc8YAIVIqDvHH1Q==\r\n" 108 "-----END CERTIFICATE-----\r\n"; 109 const size_t mbedtls_test_srv_crt_ec_len = sizeof( mbedtls_test_srv_crt_ec ); 110 111 const char mbedtls_test_srv_key_ec[] = 112 "-----BEGIN EC PRIVATE KEY-----\r\n" 113 "MHcCAQEEIPEqEyB2AnCoPL/9U/YDHvdqXYbIogTywwyp6/UfDw6noAoGCCqGSM49\r\n" 114 "AwEHoUQDQgAEN8xW2XYJHlpyPsdZLf8gbu58+QaRdNCtFLX3aCJZYpJO5QDYIxH/\r\n" 115 "6i/SNF1dFr2KiMJrdw1VzYoqDvoByLTt/w==\r\n" 116 "-----END EC PRIVATE KEY-----\r\n"; 117 const size_t mbedtls_test_srv_key_ec_len = sizeof( mbedtls_test_srv_key_ec ); 118 119 const char mbedtls_test_cli_crt_ec[] = 120 "-----BEGIN CERTIFICATE-----\r\n" 121 "MIICLDCCAbKgAwIBAgIBDTAKBggqhkjOPQQDAjA+MQswCQYDVQQGEwJOTDERMA8G\r\n" 122 "A1UEChMIUG9sYXJTU0wxHDAaBgNVBAMTE1BvbGFyc3NsIFRlc3QgRUMgQ0EwHhcN\r\n" 123 "MTMwOTI0MTU1MjA0WhcNMjMwOTIyMTU1MjA0WjBBMQswCQYDVQQGEwJOTDERMA8G\r\n" 124 "A1UEChMIUG9sYXJTU0wxHzAdBgNVBAMTFlBvbGFyU1NMIFRlc3QgQ2xpZW50IDIw\r\n" 125 "WTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARX5a6xc9/TrLuTuIH/Eq7u5lOszlVT\r\n" 126 "9jQOzC7jYyUL35ji81xgNpbA1RgUcOV/n9VLRRjlsGzVXPiWj4dwo+THo4GdMIGa\r\n" 127 "MAkGA1UdEwQCMAAwHQYDVR0OBBYEFHoAX4Zk/OBd5REQO7LmO8QmP8/iMG4GA1Ud\r\n" 128 "IwRnMGWAFJ1tICRJAT8ry3i1Gbx+JMnb+zZ8oUKkQDA+MQswCQYDVQQGEwJOTDER\r\n" 129 "MA8GA1UEChMIUG9sYXJTU0wxHDAaBgNVBAMTE1BvbGFyc3NsIFRlc3QgRUMgQ0GC\r\n" 130 "CQDBQ+J+YkPM6DAKBggqhkjOPQQDAgNoADBlAjBKZQ17IIOimbmoD/yN7o89u3BM\r\n" 131 "lgOsjnhw3fIOoLIWy2WOGsk/LGF++DzvrRzuNiACMQCd8iem1XS4JK7haj8xocpU\r\n" 132 "LwjQje5PDGHfd3h9tP38Qknu5bJqws0md2KOKHyeV0U=\r\n" 133 "-----END CERTIFICATE-----\r\n"; 134 const size_t mbedtls_test_cli_crt_ec_len = sizeof( mbedtls_test_cli_crt_ec ); 135 136 const char mbedtls_test_cli_key_ec[] = 137 "-----BEGIN EC PRIVATE KEY-----\r\n" 138 "MHcCAQEEIPb3hmTxZ3/mZI3vyk7p3U3wBf+WIop6hDhkFzJhmLcqoAoGCCqGSM49\r\n" 139 "AwEHoUQDQgAEV+WusXPf06y7k7iB/xKu7uZTrM5VU/Y0Dswu42MlC9+Y4vNcYDaW\r\n" 140 "wNUYFHDlf5/VS0UY5bBs1Vz4lo+HcKPkxw==\r\n" 141 "-----END EC PRIVATE KEY-----\r\n"; 142 const size_t mbedtls_test_cli_key_ec_len = sizeof( mbedtls_test_cli_key_ec ); 143 #endif /* MBEDTLS_ECDSA_C */ 144 145 #if defined(MBEDTLS_RSA_C) 146 #if defined(MBEDTLS_SHA256_C) 147 #define TEST_CA_CRT_R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TZMnnVMpde1io+voAtql7j\r\n" \ 163 "4sRhLrjD7o3THtwRbDa2diCvpq0Sq23Ng2LMYoXsOxoL/RQK3iN7UKxV3MKPEr0w\r\n" \ 164 "XQS+kKQqiT2bsfrjnWMVHZtUOMpm6FNqcdGm/Rss3vKda2lcKl8kUnq/ylc1+QbB\r\n" \ 165 "G6A6tUvQcr2ZyWfVg+mM5XkhTrOOXus2OLikb4WwEtJTJRNE0f+yPODSUz0/vT57\r\n" \ 166 "ApH0CnB80bYJshYHPHHymOtleAB8KSYtqm75g/YNobjnjB6cm4HkW3OZRVIl6fYY\r\n" \ 167 "n20NRVA1Vjs6GAROr4NqW4k/+LofY9y0LLDE+p0oIEKXIsIvhPr39swxSA==\r\n" \ 168 "-----END CERTIFICATE-----\r\n" 169 170 static const char mbedtls_test_ca_crt_rsa_sha256[] = TEST_CA_CRT_RSA_SHA256; 171 const char mbedtls_test_ca_crt_rsa[] = TEST_CA_CRT_RSA_SHA256; 172 const size_t mbedtls_test_ca_crt_rsa_len = sizeof( mbedtls_test_ca_crt_rsa ); 173 #define TEST_CA_CRT_RSA_SOME 174 #endif /* MBEDTLS_SHA256_C */ 175 176 #if !defined(TEST_CA_CRT_RSA_SOME) || defined(MBEDTLS_SHA1_C) 177 #define TEST_CA_CRT_RSA_SHA1 \ 178 "-----BEGIN CERTIFICATE-----\r\n" \ 179 "MIIDhzCCAm+gAwIBAgIBADANBgkqhkiG9w0BAQUFADA7MQswCQYDVQQGEwJOTDER\r\n" \ 180 "MA8GA1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwHhcN\r\n" \ 181 "MTEwMjEyMTQ0NDAwWhcNMjEwMjEyMTQ0NDAwWjA7MQswCQYDVQQGEwJOTDERMA8G\r\n" \ 182 "A1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwggEiMA0G\r\n" \ 183 "CSqGSIb3DQEBAQUAA4IBDwAwgg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0qCg1dVewhUBcW5gZKzV7e9+DpVA==\r\n" \ 198 "-----END CERTIFICATE-----\r\n" 199 200 static const char mbedtls_test_ca_crt_rsa_sha1[] = TEST_CA_CRT_RSA_SHA1; 201 202 #if !defined (TEST_CA_CRT_RSA_SOME) 203 const char mbedtls_test_ca_crt_rsa[] = TEST_CA_CRT_RSA_SHA1; 204 const size_t mbedtls_test_ca_crt_rsa_len = sizeof( mbedtls_test_ca_crt_rsa ); 205 #endif /* !TEST_CA_CRT_RSA_SOME */ 206 #endif /* !TEST_CA_CRT_RSA_COME || MBEDTLS_SHA1_C */ 207 208 #if defined(MBEDTLS_SHA256_C) 209 /* tests/data_files/server2-sha256.crt */ 210 /* Or more precisely, this is the contents of the version of this file 211 * that's in the mbedtls-2.16 branch, due to a backporting mistake. 212 * We don't want to change the contents now, as that would change the size 213 * which is part of the ABI, which should be stable in LTS branches. */ 214 #define TEST_SRV_CRT_RSA_SHA256 \ 215 "-----BEGIN CERTIFICATE-----\r\n" \ 216 "MIIDNzCCAh+gAwIBAgIBAjANBgkqhkiG9w0BAQsFADA7MQswCQYDVQQGEwJOTDER\r\n" \ 217 "MA8GA1UECgwIUG9sYXJTU0wxGTAXBgNVBAMMEFBvbGFyU1NMIFRlc3QgQ0EwHhcN\r\n" \ 218 "MTkwMjEwMTQ0NDA2WhcNMjkwMjEwMTQ0NDA2WjA0MQswCQYDVQQGEwJOTDERMA8G\r\n" \ 219 "A1UECgwIUG9sYXJTU0wxEjAQBgNVBAMMCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcN\r\n" \ 220 "AQEBBQADggEPADCCAQoCggEBAMFNo93nzR3RBNdJcriZrA545Do8Ss86ExbQWuTN\r\n" \ 221 "owCIp+4ea5anUrSQ7y1yej4kmvy2NKwk9XfgJmSMnLAofaHa6ozmyRyWvP7BBFKz\r\n" \ 222 "NtSj+uGxdtiQwWG0ZlI2oiZTqqt0Xgd9GYLbKtgfoNkNHC1JZvdbJXNG6AuKT2kM\r\n" \ 223 "tQCQ4dqCEGZ9rlQri2V5kaHiYcPNQEkI7mgM8YuG0ka/0LiqEQMef1aoGh5EGA8P\r\n" \ 224 "hYvai0Re4hjGYi/HZo36Xdh98yeJKQHFkA4/J/EwyEoO79bex8cna8cFPXrEAjya\r\n" \ 225 "HT4P6DSYW8tzS1KW2BGiLICIaTla0w+w3lkvEcf36hIBMJcCAwEAAaNNMEswCQYD\r\n" \ 226 "VR0TBAIwADAdBgNVHQ4EFgQUpQXoZLjc32APUBJNYKhkr02LQ5MwHwYDVR0jBBgw\r\n" \ 227 "FoAUtFrkpbPe0lL2udWmlQ/rPrzH/f8wDQYJKoZIhvcNAQELBQADggEBAC465FJh\r\n" \ 228 "Pqel7zJngHIHJrqj/wVAxGAFOTF396XKATGAp+HRCqJ81Ry60CNK1jDzk8dv6M6U\r\n" \ 229 "HoS7RIFiM/9rXQCbJfiPD5xMTejZp5n5UYHAmxsxDaazfA5FuBhkfokKK6jD4Eq9\r\n" \ 230 "1C94xGKb6X4/VkaPF7cqoBBw/bHxawXc0UEPjqayiBpCYU/rJoVZgLqFVP7Px3sv\r\n" \ 231 "a1nOrNx8rPPI1hJ+ZOg8maiPTxHZnBVLakSSLQy/sWeWyazO1RnrbxjrbgQtYKz0\r\n" \ 232 "e3nwGpu1w13vfckFmUSBhHXH7AAS/HpKC4IH7G2GAk3+n8iSSN71sZzpxonQwVbo\r\n" \ 233 "pMZqLmbBm/7WPLc=\r\n" \ 234 "-----END CERTIFICATE-----\r\n" 235 236 const char mbedtls_test_srv_crt_rsa[] = TEST_SRV_CRT_RSA_SHA256; 237 const size_t mbedtls_test_srv_crt_rsa_len = sizeof( mbedtls_test_srv_crt_rsa ); 238 #define TEST_SRV_CRT_RSA_SOME 239 #endif /* MBEDTLS_SHA256_C */ 240 241 #if !defined(TEST_SRV_CRT_RSA_SOME) || defined(MBEDTLS_SHA1_C) 242 /* tests/data_files/server2.crt */ 243 #define TEST_SRV_CRT_RSA_SHA1 \ 244 "-----BEGIN CER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gny\r\n" \ 259 "oBwzIg7LGeiuIeSJXGLZ6+MVR6vjCSm4lYVFbLmrk7DRRb+JlB/9knpAtMIzT4JB\r\n" \ 260 "x/eDnoI9/gNO8K8pLFmNkcXBdr/QxVR+Ao/kPWHoWQtxnzfyusZlbYNvFlchORCw\r\n" \ 261 "m1Wcvksm9LiIXDknugnXrAc2itXY1Iq8QmyFR/SXn3IMrn1LMlwgLOl6RccliBNm\r\n" \ 262 "YmyNC+pRJ047hjzMIgDT0FZH3eVgJ93b3ec4bxY1tPPlAAx1QwFGnXlt67QzsLCb\r\n" \ 263 "WBKL+sRYcWvNwEUnwbOii6N895YciSZUnzCo53uhJq6/\r\n" \ 264 "-----END CERTIFICATE-----\r\n" 265 266 #if !defined(TEST_SRV_CRT_RSA_SOME) 267 const char mbedtls_test_srv_crt_rsa[] = TEST_SRV_CRT_RSA_SHA1; 268 const size_t mbedtls_test_srv_crt_rsa_len = sizeof( mbedtls_test_srv_crt_rsa ); 269 #endif /* TEST_SRV_CRT_RSA_SOME */ 270 #endif /* !TEST_CA_CRT_RSA_SOME || MBEDTLS_SHA1_C */ 271 272 const char mbedtls_test_ca_key_rsa[] = 273 "-----BEGIN RSA PRIVATE KEY-----\r\n" 274 "Proc-Type: 4,ENCRYPTED\r\n" 275 "DEK-Info: DES-EDE3-CBC,A8A95B05D5B7206B\r\n" 276 "\r\n" 277 "9Qd9GeArejl1GDVh2lLV1bHt0cPtfbh5h/5zVpAVaFpqtSPMrElp50Rntn9et+JA\r\n" 278 "7VOyboR+Iy2t/HU4WvA687k3Bppe9GwKHjHhtl//8xFKwZr3Xb5yO5JUP8AUctQq\r\n" 279 "Nb8CLlZyuUC+52REAAthdWgsX+7dJO4yabzUcQ22Tp9JSD0hiL43BlkWYUNK3dAo\r\n" 280 "PZlmiptjnzVTjg1MxsBSydZinWOLBV8/JQgxSPo2yD4uEfig28qbvQ2wNIn0pnAb\r\n" 281 "GxnSAOazkongEGfvcjIIs+LZN9gXFhxcOh6kc4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yCYyyWuUct8g4RzErcY9+yW9Om5Hzpx4zOuW4NPZgPDTgK+t2RSL/Yq\r\n" 297 "rE1njrgeGYcVeG3f+OftH4s6fPbq7t1A5ZgUscbLMBqr9tK+OqygR4EgKBPsH6Cz\r\n" 298 "L6zlv/2RV0qAHvVuDJcIDIgwY5rJtINEm32rhOeFNJwZS5MNIC1czXZx5//ugX7l\r\n" 299 "I4sy5nbVhwSjtAk8Xg5dZbdTZ6mIrb7xqH+fdakZor1khG7bC2uIwibD3cSl2XkR\r\n" 300 "wN48lslbHnqqagr6Xm1nNOSVl8C/6kbJEsMpLhAezfRtGwvOucoaE+WbeUNolGde\r\n" 301 "P/eQiddSf0brnpiLJRh7qZrl9XuqYdpUqnoEdMAfotDOID8OtV7gt8a48ad8VPW2\r\n" 302 "-----END RSA PRIVATE KEY-----\r\n"; 303 const size_t mbedtls_test_ca_key_rsa_len = sizeof( mbedtls_test_ca_key_rsa ); 304 305 const char mbedtls_test_ca_pwd_rsa[] = "PolarSSLTest"; 306 const size_t mbedtls_test_ca_pwd_rsa_len = sizeof( mbedtls_test_ca_pwd_rsa ) - 1; 307 308 /* tests/data_files/server2.key */ 309 const char mbedtls_test_srv_key_rsa[] = 310 "-----BEGIN RSA PRIVATE KEY-----\r\n" 311 "MIIEpAIBAAKCAQEAwU2j3efNHdEE10lyuJmsDnjkOjxKzzoTFtBa5M2jAIin7h5r\r\n" 312 "lqdStJDvLXJ6PiSa/LY0rCT1d+AmZIycsCh9odrqjObJHJa8/sEEUrM21KP64bF2\r\n" 313 "2JDBYbRmUjaiJlOqq3ReB30Zgtsq2B+g2Q0cLUlm91slc0boC4pPaQy1AJDh2oIQ\r\n" 314 "Zn2uVCuLZXmRoeJhw81ASQjuaAzxi4bSRr/QuKoRAx5/VqgaHkQYDw+Fi9qLRF7i\r\n" 315 "GMZiL8dmjfpd2H3zJ4kpAcWQDj8n8TDISg7v1t7HxydrxwU9esQCPJodPg/oNJhb\r\n" 316 "y3NLUpbYEaIsgI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6pUdA3BZiQvEs\r\n" 331 "3LjHVd4HPJ2x0N8CgrBIWOE0q8+0hSMmeE96WW/7jD3fPWwCR5zlXknxBQsfv0gP\r\n" 332 "3BC5PR0Qdypz+d+9zfMf625kyit4T/hzwhDveZUzHnk1Cf+IG7Q+TOEnLnWAWBED\r\n" 333 "ISOWmrUCgYAFEmRxgwAc/u+D6t0syCwAYh6POtscq9Y0i9GyWk89NzgC4NdwwbBH\r\n" 334 "4AgahOxIxXx2gxJnq3yfkJfIjwf0s2DyP0kY2y6Ua1OeomPeY9mrIS4tCuDQ6LrE\r\n" 335 "TB6l9VGoxJL4fyHnZb8L5gGvnB1bbD8cL6YPaDiOhcRseC9vBiEuVg==\r\n" 336 "-----END RSA PRIVATE KEY-----\r\n"; 337 const size_t mbedtls_test_srv_key_rsa_len = sizeof( mbedtls_test_srv_key_rsa ); 338 339 /* tests/data_files/cli-rsa-sha256.crt */ 340 const char mbedtls_test_cli_crt_rsa[] = 341 "-----BEGIN CERTIFICATE-----\r\n" 342 "MIIDhTCCAm2gAwIBAgIBBDANBgkqhkiG9w0BAQsFADA7MQswCQYDVQQGEwJOTDER\r\n" 343 "MA8GA1UECgwIUG9sYXJTU0wxGTAXBgNVBAMMEFBvbGFyU1NMIFRlc3QgQ0EwHhcN\r\n" 344 "MTkwMzEyMTAwNDAxWhcNMjkwMzEyMTAwNDAxWjA8MQswCQYDVQQGEwJOTDERMA8G\r\n" 345 "A1UECgwIUG9sYXJTU0wxGjAYBgNVBAMMEVBvbGFyU1NMIENsaWVudCAyMIIBIjAN\r\n" 346 "BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyHTEzLn5tXnpRdkUYLB9u5Pyax6f\r\n" 347 "M60Nj4o8VmXl3ETZzGaFB9X4J7BKNdBjngpuG7fa8H6r7gwQk4ZJGDTzqCrSV/Uu\r\n" 348 "1C93KYRhTYJQj6eVSHD1bk2y1RPD0hrt5kPqQhTrdOrA7R/UV06p86jt0uDBMHEw\r\n" 349 "MjDV0/YI0FZPRo7yX/k9Z5GIMC5Cst99++UMd//sMcB4j7/Cf8qtbCHWjdmLao5v\r\n" 350 "4Jv4EFbMs44TFeY0BGbH7vk2DmqV9gmaBmf0ZXH4yqSxJeD+PIs1BGe64E92hfx/\r\n" 351 "/DZrtenNLQNiTrM9AM+vdqBpVoNq0qjU51Bx5rU2BXcFbXvI5MT9TNUhXwIDAQAB\r\n" 352 "o4GSMIGPMB0GA1UdDgQWBBRxoQBzckAvVHZeM/xSj7zx3WtGITBjBgNVHSMEXDBa\r\n" 353 "gBS0WuSls97SUva51aaVD+s+vMf9/6E/pD0wOzELMAkGA1UEBhMCTkwxETAPBgNV\r\n" 354 "BAoMCFBvbGFyU1NMMRkwFwYDVQQDDBBQb2xhclNTTCBUZXN0IENBggEDMAkGA1Ud\r\n" 355 "EwQCMAAwDQYJKoZIhvcNAQELBQADggEBAH78VDMNqHyxX1Tdss1Dcbx475Gei+OO\r\n" 356 "Pv5Z4EPLg/0Y7YgBoXI+3lM17CVhT9w5epPaSYmxzthtK0QSuJaS6Jgt7eHaQITT\r\n" 357 "3KXcMPqluwCy1ddr1IRYW9dXCFtgaRNJibpDuuAwf8T2tCSsY6EaYDoNgv2y6ogu\r\n" 358 "rh5/q7ca7Q4ENv3H+xq1V77baDa0QZijdPQ+WR+NTKPU0D8mDKlWLNSCpuItQ4Tu\r\n" 359 "AYzCCTosMTHlGQJ/7BkhqChH0MLTCIlUktVjY7z/4XfOWYVUMPdqUJWwfz6AgEXL\r\n" 360 "wjAFhq2OPrmyY2u8mrcVqpArDukPi9hOX5jzJtJaQVf4srpOL8e4nYg=\r\n" 361 "-----END CERTIFICATE-----\r\n"; 362 const size_t mbedtls_test_cli_crt_rsa_len = sizeof( mbedtls_test_cli_crt_rsa ); 363 364 const char mbedtls_test_cli_key_rsa[] = 365 "-----BEGIN RSA PRIVATE KEY-----\r\n" 366 "MIIEpAIBAAKCAQEAyHTEzLn5tXnpRdkUYLB9u5Pyax6fM60Nj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muSKV5qD9bSpZWG2nLFnslrN15Lm3fhZxoeMNhBaEDTnLT26yoi\r\n" 382 "33gp0mSSWy94ZEqipms+ULF6sY1ZtFW6tpGFoy8CgYAQHhnnvJflIs2ky4q10B60\r\n" 383 "ZcxFp3rtDpkp0JxhFLhiizFrujMtZSjYNm5U7KkgPVHhLELEUvCmOnKTt4ap/vZ0\r\n" 384 "BxJNe1GZH3pW6SAvGDQpl9sG7uu/vTFP+lCxukmzxB0DrrDcvorEkKMom7ZCCRvW\r\n" 385 "KZsZ6YeH2Z81BauRj218kQKBgQCUV/DgKP2985xDTT79N08jUo3hTP5MVYCCuj/+\r\n" 386 "UeEw1TvZcx3LJby7P6Xad6a1/BqveaGyFKIfEFIaBUBItk801sDDpDaYc4gL00Xc\r\n" 387 "7lFuBHOZkxJYlss5QrGpuOEl9ZwUt5IrFLBdYaKqNHzNVC1pCPfb/JyH6Dr2HUxq\r\n" 388 "gxUwAQKBgQCcU6G2L8AG9d9c0UpOyL1tMvFe5Ttw0KjlQVdsh1MP6yigYo9DYuwu\r\n" 389 "bHFVW2r0dBTqegP2/KTOxKzaHfC1qf0RGDsUoJCNJrd1cwoCLG8P2EF4w3OBrKqv\r\n" 390 "8u4ytY0F+Vlanj5lm3TaoHSVF1+NWPyOTiwevIECGKwSxvlki4fDAA==\r\n" 391 "-----END RSA PRIVATE KEY-----\r\n"; 392 const size_t mbedtls_test_cli_key_rsa_len = sizeof( mbedtls_test_cli_key_rsa ); 393 #endif /* MBEDTLS_RSA_C */ 394 395 #if defined(MBEDTLS_PEM_PARSE_C) 396 /* Concatenation of all available CA certificates */ 397 const char mbedtls_test_cas_pem[] = 398 #ifdef TEST_CA_CRT_RSA_SHA1 399 TEST_CA_CRT_RSA_SHA1 400 #endif 401 #ifdef TEST_CA_CRT_RSA_SHA256 402 TEST_CA_CRT_RSA_SHA256 403 #endif 404 #ifdef TEST_CA_CRT_EC 405 TEST_CA_CRT_EC 406 #endif 407 ""; 408 const size_t mbedtls_test_cas_pem_len = sizeof( mbedtls_test_cas_pem ); 409 #endif 410 411 /* List of all available CA certificates */ 412 const char * mbedtls_test_cas[] = { 413 #if defined(TEST_CA_CRT_RSA_SHA1) 414 mbedtls_test_ca_crt_rsa_sha1, 415 #endif 416 #if defined(TEST_CA_CRT_RSA_SHA256) 417 mbedtls_test_ca_crt_rsa_sha256, 418 #endif 419 #if defined(MBEDTLS_ECDSA_C) 420 mbedtls_test_ca_crt_ec, 421 #endif 422 NULL 423 }; 424 const size_t mbedtls_test_cas_len[] = { 425 #if defined(TEST_CA_CRT_RSA_SHA1) 426 sizeof( mbedtls_test_ca_crt_rsa_sha1 ), 427 #endif 428 #if defined(TEST_CA_CRT_RSA_SHA256) 429 sizeof( mbedtls_test_ca_crt_rsa_sha256 ), 430 #endif 431 #if defined(MBEDTLS_ECDSA_C) 432 sizeof( mbedtls_test_ca_crt_ec ), 433 #endif 434 0 435 }; 436 437 #if defined(MBEDTLS_RSA_C) 438 const char *mbedtls_test_ca_crt = mbedtls_test_ca_crt_rsa; /* SHA1 or SHA256 */ 439 const char *mbedtls_test_ca_key = mbedtls_test_ca_key_rsa; 440 const char *mbedtls_test_ca_pwd = mbedtls_test_ca_pwd_rsa; 441 const char *mbedtls_test_srv_crt = mbedtls_test_srv_crt_rsa; 442 const char *mbedtls_test_srv_key = mbedtls_test_srv_key_rsa; 443 const char *mbedtls_test_cli_crt = mbedtls_test_cli_crt_rsa; 444 const char *mbedtls_test_cli_key = mbedtls_test_cli_key_rsa; 445 const size_t mbedtls_test_ca_crt_len = sizeof( mbedtls_test_ca_crt_rsa ); 446 const size_t mbedtls_test_ca_key_len = sizeof( mbedtls_test_ca_key_rsa ); 447 const size_t mbedtls_test_ca_pwd_len = sizeof( mbedtls_test_ca_pwd_rsa ) - 1; 448 const size_t mbedtls_test_srv_crt_len = sizeof( mbedtls_test_srv_crt_rsa ); 449 const size_t mbedtls_test_srv_key_len = sizeof( mbedtls_test_srv_key_rsa ); 450 const size_t mbedtls_test_cli_crt_len = sizeof( mbedtls_test_cli_crt_rsa ); 451 const size_t mbedtls_test_cli_key_len = sizeof( mbedtls_test_cli_key_rsa ); 452 #else /* ! MBEDTLS_RSA_C, so MBEDTLS_ECDSA_C */ 453 const char *mbedtls_test_ca_crt = mbedtls_test_ca_crt_ec; 454 const char *mbedtls_test_ca_key = mbedtls_test_ca_key_ec; 455 const char *mbedtls_test_ca_pwd = mbedtls_test_ca_pwd_ec; 456 const char *mbedtls_test_srv_crt = mbedtls_test_srv_crt_ec; 457 const char *mbedtls_test_srv_key = mbedtls_test_srv_key_ec; 458 const char *mbedtls_test_cli_crt = mbedtls_test_cli_crt_ec; 459 const char *mbedtls_test_cli_key = mbedtls_test_cli_key_ec; 460 const size_t mbedtls_test_ca_crt_len = sizeof( mbedtls_test_ca_crt_ec ); 461 const size_t mbedtls_test_ca_key_len = sizeof( mbedtls_test_ca_key_ec ); 462 const size_t mbedtls_test_ca_pwd_len = sizeof( mbedtls_test_ca_pwd_ec ) - 1; 463 const size_t mbedtls_test_srv_crt_len = sizeof( mbedtls_test_srv_crt_ec ); 464 const size_t mbedtls_test_srv_key_len = sizeof( mbedtls_test_srv_key_ec ); 465 const size_t mbedtls_test_cli_crt_len = sizeof( mbedtls_test_cli_crt_ec ); 466 const size_t mbedtls_test_cli_key_len = sizeof( mbedtls_test_cli_key_ec ); 467 #endif /* MBEDTLS_RSA_C */ 468 469 #endif /* MBEDTLS_CERTS_C */ 470