1a8e1175bSopenharmony_ci/*
2a8e1175bSopenharmony_ci *  X.509 test certificates
3a8e1175bSopenharmony_ci *
4a8e1175bSopenharmony_ci *  Copyright The Mbed TLS Contributors
5a8e1175bSopenharmony_ci *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
6a8e1175bSopenharmony_ci */
7a8e1175bSopenharmony_ci
8a8e1175bSopenharmony_ci/* THIS FILE is generated by `tests/scripts/generate_test_cert_macros.py` */
9a8e1175bSopenharmony_ci/* *INDENT-OFF* */
10a8e1175bSopenharmony_ci
11a8e1175bSopenharmony_ci{% for mode, name, value in macros %}
12a8e1175bSopenharmony_ci    {% if mode == 'string' %}
13a8e1175bSopenharmony_ci/* This is taken from {{value}}. */
14a8e1175bSopenharmony_ci/* BEGIN FILE string macro {{name}} {{value}} */
15a8e1175bSopenharmony_ci#define {{name}}{{ '\\' | put_to_column(position=80-9-name|length)}}
16a8e1175bSopenharmony_ci        {% for line in value | read_lines %}
17a8e1175bSopenharmony_ci    "{{line}}\r\n"{% if not loop.last %}{{ '\\' | put_to_column(position=80-10-1-line|length)}}
18a8e1175bSopenharmony_ci        {% endif %}
19a8e1175bSopenharmony_ci        {% endfor %}
20a8e1175bSopenharmony_ci
21a8e1175bSopenharmony_ci/* END FILE */
22a8e1175bSopenharmony_ci    {% endif %}
23a8e1175bSopenharmony_ci    {% if mode == 'binary' %}
24a8e1175bSopenharmony_ci/* This is generated from {{value}}. */
25a8e1175bSopenharmony_ci/* BEGIN FILE binary macro {{name}} {{value}} */
26a8e1175bSopenharmony_ci#define {{name}} {% raw -%} { {%- endraw %} {{ '\\' | put_to_column(position=80-11-name|length)}}
27a8e1175bSopenharmony_ci        {% for line in value | read_as_c_array %}
28a8e1175bSopenharmony_ci            {% if not loop.last %}
29a8e1175bSopenharmony_ci        {{line}},{{ '\\' | put_to_column(position=80-9-line|length)}}
30a8e1175bSopenharmony_ci            {% else %}
31a8e1175bSopenharmony_ci        {{line}}{{ '\\' | put_to_column(position=80-8-line|length)}}
32a8e1175bSopenharmony_ci            {% endif %}
33a8e1175bSopenharmony_ci        {% endfor %}
34a8e1175bSopenharmony_ci{% raw -%} } {%- endraw %}
35a8e1175bSopenharmony_ci
36a8e1175bSopenharmony_ci/* END FILE */
37a8e1175bSopenharmony_ci    {% endif %}
38a8e1175bSopenharmony_ci    {% if mode == 'password' %}
39a8e1175bSopenharmony_ci#define {{name}} "{{value}}"
40a8e1175bSopenharmony_ci    {% endif %}
41a8e1175bSopenharmony_ci
42a8e1175bSopenharmony_ci{% endfor %}
43