Skip to content

Commit a2a8532

Browse files
committed
Add ArduinoBearSSLConfig.h file and include it in the build to allow library configuration
1 parent 66f8a94 commit a2a8532

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

Diff for: src/ArduinoBearSSLConfig.h

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
This file is part of ArduinoIoTCloud.
3+
4+
Copyright 2024 ARDUINO SA (http://www.arduino.cc/)
5+
6+
This software is released under the GNU General Public License version 3,
7+
which covers the main part of arduino-cli.
8+
The terms of this license can be found at:
9+
https://www.gnu.org/licenses/gpl-3.0.en.html
10+
11+
You can be released from the requirements of the above licenses by purchasing
12+
a commercial license. Buying such a license is mandatory if you want to modify or
13+
otherwise use the software for commercial activities involving the Arduino
14+
software without disclosing the source code of your own applications. To purchase
15+
a commercial license, send an email to [email protected].
16+
*/
17+
18+
#ifndef ARDUINO_BEARSSL_CONFIG_H_
19+
#define ARDUINO_BEARSSL_CONFIG_H_
20+
21+
/* Enabling this define allows the usage of ArduinoBearSSL without crypto chip. */
22+
//#define ARDUINO_DISABLE_ECCX08
23+
24+
/* Enable/Disable global instances*/
25+
#define ARDUINO_BEARSSL_DISABLE_AES128
26+
#define ARDUINO_BEARSSL_DISABLE_DES
27+
#define ARDUINO_BEARSSL_DISABLE_MD5
28+
#define ARDUINO_BEARSSL_DISABLE_SHA1
29+
#define ARDUINO_BEARSSL_DISABLE_SHA256
30+
31+
#define ARDUINO_BEARSSL_DISABLE_KEY_DECODER
32+
33+
/* If uncommented profile should be configured using client.setProfile(...) */
34+
#define ARDUINO_BEARSSL_DISABLE_FULL_CLIENT_PROFILE
35+
36+
/* If uncommented TA should be configured via constructor */
37+
#define ARDUINO_BEARSSL_DISABLE_BUILTIN_TRUST_ANCHORS
38+
39+
#define BEAR_SSL_CLIENT_CHAIN_SIZE 1
40+
41+
#endif /* ARDUINO_BEARSSL_CONFIG_H_ */

Diff for: src/ArduinoIoTCloudTCP.h

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#if defined(BOARD_HAS_OFFLOADED_ECCX08)
3838
#include "WiFiSSLClient.h"
3939
#elif defined(BOARD_HAS_ECCX08)
40+
#include <ArduinoBearSSLConfig.h>
4041
#include <ArduinoBearSSL.h>
4142
#elif defined(ARDUINO_PORTENTA_C33)
4243
#include <SSLClient.h>

0 commit comments

Comments
 (0)