certs.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /**
  2. * \file certs.h
  3. *
  4. * \brief Sample certificates and DHM parameters for testing
  5. *
  6. * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
  7. * SPDX-License-Identifier: GPL-2.0
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 2 of the License, or
  12. * (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License along
  20. * with this program; if not, write to the Free Software Foundation, Inc.,
  21. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  22. *
  23. * This file is part of mbed TLS (https://tls.mbed.org)
  24. */
  25. #ifndef MBEDTLS_CERTS_H
  26. #define MBEDTLS_CERTS_H
  27. #include <stddef.h>
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31. #if defined(MBEDTLS_PEM_PARSE_C)
  32. /* Concatenation of all CA certificates in PEM format if available */
  33. extern const char mbedtls_test_cas_pem[];
  34. extern const size_t mbedtls_test_cas_pem_len;
  35. #endif
  36. /* List of all CA certificates, terminated by NULL */
  37. extern const char * mbedtls_test_cas[];
  38. extern const size_t mbedtls_test_cas_len[];
  39. /*
  40. * Convenience for users who just want a certificate:
  41. * RSA by default, or ECDSA if RSA is not available
  42. */
  43. extern const char * mbedtls_test_ca_crt;
  44. extern const size_t mbedtls_test_ca_crt_len;
  45. extern const char * mbedtls_test_ca_key;
  46. extern const size_t mbedtls_test_ca_key_len;
  47. extern const char * mbedtls_test_ca_pwd;
  48. extern const size_t mbedtls_test_ca_pwd_len;
  49. extern const char * mbedtls_test_srv_crt;
  50. extern const size_t mbedtls_test_srv_crt_len;
  51. extern const char * mbedtls_test_srv_key;
  52. extern const size_t mbedtls_test_srv_key_len;
  53. extern const char * mbedtls_test_cli_crt;
  54. extern const size_t mbedtls_test_cli_crt_len;
  55. extern const char * mbedtls_test_cli_key;
  56. extern const size_t mbedtls_test_cli_key_len;
  57. #if defined(MBEDTLS_ECDSA_C)
  58. extern const char mbedtls_test_ca_crt_ec[];
  59. extern const size_t mbedtls_test_ca_crt_ec_len;
  60. extern const char mbedtls_test_ca_key_ec[];
  61. extern const size_t mbedtls_test_ca_key_ec_len;
  62. extern const char mbedtls_test_ca_pwd_ec[];
  63. extern const size_t mbedtls_test_ca_pwd_ec_len;
  64. extern const char mbedtls_test_srv_crt_ec[];
  65. extern const size_t mbedtls_test_srv_crt_ec_len;
  66. extern const char mbedtls_test_srv_key_ec[];
  67. extern const size_t mbedtls_test_srv_key_ec_len;
  68. extern const char mbedtls_test_cli_crt_ec[];
  69. extern const size_t mbedtls_test_cli_crt_ec_len;
  70. extern const char mbedtls_test_cli_key_ec[];
  71. extern const size_t mbedtls_test_cli_key_ec_len;
  72. #endif
  73. #if defined(MBEDTLS_RSA_C)
  74. extern const char mbedtls_test_ca_crt_rsa[];
  75. extern const size_t mbedtls_test_ca_crt_rsa_len;
  76. extern const char mbedtls_test_ca_key_rsa[];
  77. extern const size_t mbedtls_test_ca_key_rsa_len;
  78. extern const char mbedtls_test_ca_pwd_rsa[];
  79. extern const size_t mbedtls_test_ca_pwd_rsa_len;
  80. extern const char mbedtls_test_srv_crt_rsa[];
  81. extern const size_t mbedtls_test_srv_crt_rsa_len;
  82. extern const char mbedtls_test_srv_key_rsa[];
  83. extern const size_t mbedtls_test_srv_key_rsa_len;
  84. extern const char mbedtls_test_cli_crt_rsa[];
  85. extern const size_t mbedtls_test_cli_crt_rsa_len;
  86. extern const char mbedtls_test_cli_key_rsa[];
  87. extern const size_t mbedtls_test_cli_key_rsa_len;
  88. #endif
  89. #ifdef __cplusplus
  90. }
  91. #endif
  92. #endif /* certs.h */