-
Notifications
You must be signed in to change notification settings - Fork 3
/
mos.yml
91 lines (78 loc) · 2.3 KB
/
mos.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
author: mongoose-os
description: Mongoose OS port of mbedTLS
type: lib
version: 2.16.11-cesanta3
modules:
- location: https://github.com/mongoose-os/mbedtls
version: 2.16.11-cesanta3
name: mbedtls_module
sources:
- src
- src/${platform}
- ${mos.modules.mbedtls_module.path}/library
includes:
- include
- include/${platform}
- ${mos.modules.mbedtls_module.path}/include
cdefs:
MBEDTLS_USER_CONFIG_FILE: mbedtls_platform_config.h
# Do not load CA chain into memory, read it from file during verification.
# This make handshake slower but saves a lot of memory.
MBEDTLS_X509_CA_CHAIN_ON_DISK: 1
# All the certificates in the server's chain except the client certificate
# are released as soon as possible to save RAM.
# They are therefore not available for examination after handshake,
# but we don't care: Mongoose frees them immediately anyway
# (`MG_SSL_IF_MBEDTLS_FREE_CERTS` is set).
MBEDTLS_FREE_CERT_CHAIN: 1
# Provide crypto functions for Mongoose
MG_EXT_MD5: 1
MG_EXT_SHA1: 1
MG_EXT_SHA256: 1
config_schema:
- ["debug.mbedtls_level", "i", 1, {title: "mbedTLS debug level"}]
build_vars:
# Set to 1 to enable ATECCx08 support.
MGOS_MBEDTLS_ENABLE_ATCA: 0
conds:
# On CC3200 we use SimpleLink for SSL due to lack of space.
# mbedTLS is still used for crypto primitives (e.g. GCP auth).
- when: mos.platform != "cc3200"
apply:
cdefs:
MG_ENABLE_SSL: 1
MG_SSL_IF_MBEDTLS_MGOS: 100
MG_SSL_IF: MG_SSL_IF_MBEDTLS_MGOS
- when: mos.platform == "cc3200"
apply:
sources:
- src/cc32xx
includes:
- include/cc32xx
build_vars:
MGOS_MBEDTLS_ENABLE_ATCA: 0
- when: mos.platform == "cc3220"
apply:
sources:
- src/cc32xx
includes:
- include/cc32xx
- when: mos.platform == "esp32c3"
apply:
build_vars:
# TODO(rojer): Enable hardware crypto acceleration.
ESP_IDF_SDKCONFIG_OPTS: >
${build_vars.ESP_IDF_SDKCONFIG_OPTS}
CONFIG_MBEDTLS_HARDWARE_MPI=n
- when: build_vars.MGOS_MBEDTLS_ENABLE_ATCA == "1"
apply:
libs:
- location: https://github.com/mongoose-os-libs/atca
cdefs:
MBEDTLS_AES_ATCA: 1
MBEDTLS_ECP_ATCA: 1
tags:
- c
- security
manifest_version: 2018-06-20
no_implicit_init_deps: true