Skip to content

Commit 161b544

Browse files
authored
Merge pull request #45 from Orange-OpenSource/no-eccx08
Add ARDUINO_DISABLE_ECCX08
2 parents e985450 + c3748fd commit 161b544

File tree

13 files changed

+91
-2
lines changed

13 files changed

+91
-2
lines changed

README.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ image:https://github.com/{repository-owner}/{repository-name}/workflows/Spell%20
88

99
Port of https://bearssl.org[BearSSL] to Arduino.
1010

11-
This library depends on ArduinoECCX08.
11+
This library depends on ArduinoECCX08. This dependency could be
12+
disabled by defining ARDUINO_DISABLE_ECCX08 in ArduinoBearSSLConfig.h
13+
(see examples).
1214

1315
== License ==
1416

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#ifndef ARDUINO_BEARSSL_CONFIG_H_
2+
#define ARDUINO_BEARSSL_CONFIG_H_
3+
4+
/* Enabling this define allows the usage of ArduinoBearSSL without crypto chip. */
5+
//#define ARDUINO_DISABLE_ECCX08
6+
7+
#endif /* ARDUINO_BEARSSL_CONFIG_H_ */

examples/DES/ArduinoBearSSLConfig.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#ifndef ARDUINO_BEARSSL_CONFIG_H_
2+
#define ARDUINO_BEARSSL_CONFIG_H_
3+
4+
/* Enabling this define allows the usage of ArduinoBearSSL without crypto chip. */
5+
//#define ARDUINO_DISABLE_ECCX08
6+
7+
#endif /* ARDUINO_BEARSSL_CONFIG_H_ */

examples/MD5/ArduinoBearSSLConfig.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#ifndef ARDUINO_BEARSSL_CONFIG_H_
2+
#define ARDUINO_BEARSSL_CONFIG_H_
3+
4+
/* Enabling this define allows the usage of ArduinoBearSSL without crypto chip. */
5+
//#define ARDUINO_DISABLE_ECCX08
6+
7+
#endif /* ARDUINO_BEARSSL_CONFIG_H_ */
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#ifndef ARDUINO_BEARSSL_CONFIG_H_
2+
#define ARDUINO_BEARSSL_CONFIG_H_
3+
4+
/* Enabling this define allows the usage of ArduinoBearSSL without crypto chip. */
5+
//#define ARDUINO_DISABLE_ECCX08
6+
7+
#endif /* ARDUINO_BEARSSL_CONFIG_H_ */

examples/SHA1/ArduinoBearSSLConfig.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#ifndef ARDUINO_BEARSSL_CONFIG_H_
2+
#define ARDUINO_BEARSSL_CONFIG_H_
3+
4+
/* Enabling this define allows the usage of ArduinoBearSSL without crypto chip. */
5+
//#define ARDUINO_DISABLE_ECCX08
6+
7+
#endif /* ARDUINO_BEARSSL_CONFIG_H_ */
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#ifndef ARDUINO_BEARSSL_CONFIG_H_
2+
#define ARDUINO_BEARSSL_CONFIG_H_
3+
4+
/* Enabling this define allows the usage of ArduinoBearSSL without crypto chip. */
5+
//#define ARDUINO_DISABLE_ECCX08
6+
7+
#endif /* ARDUINO_BEARSSL_CONFIG_H_ */
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#ifndef ARDUINO_BEARSSL_CONFIG_H_
2+
#define ARDUINO_BEARSSL_CONFIG_H_
3+
4+
/* Enabling this define allows the usage of ArduinoBearSSL without crypto chip. */
5+
//#define ARDUINO_DISABLE_ECCX08
6+
7+
#endif /* ARDUINO_BEARSSL_CONFIG_H_ */
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#ifndef ARDUINO_BEARSSL_CONFIG_H_
2+
#define ARDUINO_BEARSSL_CONFIG_H_
3+
4+
/* Enabling this define allows the usage of ArduinoBearSSL without crypto chip. */
5+
//#define ARDUINO_DISABLE_ECCX08
6+
7+
#endif /* ARDUINO_BEARSSL_CONFIG_H_ */

src/ArduinoBearSSL.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@
2525
#ifndef _ARDUINO_BEAR_SSL_H_
2626
#define _ARDUINO_BEAR_SSL_H_
2727

28+
#if defined __has_include
29+
# if __has_include (<ArduinoBearSSLConfig.h>)
30+
# include <ArduinoBearSSLConfig.h>
31+
# endif
32+
#endif
33+
2834
#include "BearSSLClient.h"
2935
#include "SHA1.h"
3036
#include "SHA256.h"

0 commit comments

Comments
 (0)