Skip to content

Commit ff3f51d

Browse files
committed
Add ArduinoBearSSLConfig.h file to allow library configuration
1 parent 802cd2c commit ff3f51d

File tree

3 files changed

+45
-2
lines changed

3 files changed

+45
-2
lines changed

src/ArduinoBearSSLConfig.h

Lines changed: 41 additions & 0 deletions
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 license@arduino.cc.
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_ */

src/tls/utility/TLSClientMqtt.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
* Arduino Giga R1
2929
* OPTA
3030
*/
31-
#include <tls/BearSSLClient.h>
31+
#include <ArduinoBearSSLConfig.h>
32+
#include <ArduinoBearSSL.h>
3233
class TLSClientMqtt : public BearSSLClient {
3334
#elif defined(ARDUINO_PORTENTA_C33)
3435
/*

src/tls/utility/TLSClientOta.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
* Arduino Giga R1
2929
* OPTA
3030
*/
31-
#include <tls/BearSSLClient.h>
31+
#include <ArduinoBearSSLConfig.h>
32+
#include <ArduinoBearSSL.h>
3233
class TLSClientOta : public BearSSLClient {
3334
#elif defined(ARDUINO_PORTENTA_C33)
3435
/*

0 commit comments

Comments
 (0)