From a1be93a361511ea2b9834a890008732428e97d0f Mon Sep 17 00:00:00 2001 From: pennam Date: Wed, 5 Jun 2024 11:34:23 +0200 Subject: [PATCH 1/2] Remove ArduinoBearSSLConfig.h files from sketch folder --- examples/AES128/ArduinoBearSSLConfig.h | 7 ------- examples/DES/ArduinoBearSSLConfig.h | 7 ------- examples/MD5/ArduinoBearSSLConfig.h | 7 ------- examples/MKRGSMSSLClient/ArduinoBearSSLConfig.h | 7 ------- examples/SHA1/ArduinoBearSSLConfig.h | 7 ------- examples/SHA256/ArduinoBearSSLConfig.h | 7 ------- examples/WiFiSSLClient/ArduinoBearSSLConfig.h | 7 ------- examples/extras/WiFiSSLClientNoSNI/ArduinoBearSSLConfig.h | 7 ------- 8 files changed, 56 deletions(-) delete mode 100644 examples/AES128/ArduinoBearSSLConfig.h delete mode 100644 examples/DES/ArduinoBearSSLConfig.h delete mode 100644 examples/MD5/ArduinoBearSSLConfig.h delete mode 100644 examples/MKRGSMSSLClient/ArduinoBearSSLConfig.h delete mode 100644 examples/SHA1/ArduinoBearSSLConfig.h delete mode 100644 examples/SHA256/ArduinoBearSSLConfig.h delete mode 100644 examples/WiFiSSLClient/ArduinoBearSSLConfig.h delete mode 100644 examples/extras/WiFiSSLClientNoSNI/ArduinoBearSSLConfig.h diff --git a/examples/AES128/ArduinoBearSSLConfig.h b/examples/AES128/ArduinoBearSSLConfig.h deleted file mode 100644 index 160fc22..0000000 --- a/examples/AES128/ArduinoBearSSLConfig.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef ARDUINO_BEARSSL_CONFIG_H_ -#define ARDUINO_BEARSSL_CONFIG_H_ - -/* Enabling this define allows the usage of ArduinoBearSSL without crypto chip. */ -//#define ARDUINO_DISABLE_ECCX08 - -#endif /* ARDUINO_BEARSSL_CONFIG_H_ */ diff --git a/examples/DES/ArduinoBearSSLConfig.h b/examples/DES/ArduinoBearSSLConfig.h deleted file mode 100644 index 160fc22..0000000 --- a/examples/DES/ArduinoBearSSLConfig.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef ARDUINO_BEARSSL_CONFIG_H_ -#define ARDUINO_BEARSSL_CONFIG_H_ - -/* Enabling this define allows the usage of ArduinoBearSSL without crypto chip. */ -//#define ARDUINO_DISABLE_ECCX08 - -#endif /* ARDUINO_BEARSSL_CONFIG_H_ */ diff --git a/examples/MD5/ArduinoBearSSLConfig.h b/examples/MD5/ArduinoBearSSLConfig.h deleted file mode 100644 index 160fc22..0000000 --- a/examples/MD5/ArduinoBearSSLConfig.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef ARDUINO_BEARSSL_CONFIG_H_ -#define ARDUINO_BEARSSL_CONFIG_H_ - -/* Enabling this define allows the usage of ArduinoBearSSL without crypto chip. */ -//#define ARDUINO_DISABLE_ECCX08 - -#endif /* ARDUINO_BEARSSL_CONFIG_H_ */ diff --git a/examples/MKRGSMSSLClient/ArduinoBearSSLConfig.h b/examples/MKRGSMSSLClient/ArduinoBearSSLConfig.h deleted file mode 100644 index 160fc22..0000000 --- a/examples/MKRGSMSSLClient/ArduinoBearSSLConfig.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef ARDUINO_BEARSSL_CONFIG_H_ -#define ARDUINO_BEARSSL_CONFIG_H_ - -/* Enabling this define allows the usage of ArduinoBearSSL without crypto chip. */ -//#define ARDUINO_DISABLE_ECCX08 - -#endif /* ARDUINO_BEARSSL_CONFIG_H_ */ diff --git a/examples/SHA1/ArduinoBearSSLConfig.h b/examples/SHA1/ArduinoBearSSLConfig.h deleted file mode 100644 index 160fc22..0000000 --- a/examples/SHA1/ArduinoBearSSLConfig.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef ARDUINO_BEARSSL_CONFIG_H_ -#define ARDUINO_BEARSSL_CONFIG_H_ - -/* Enabling this define allows the usage of ArduinoBearSSL without crypto chip. */ -//#define ARDUINO_DISABLE_ECCX08 - -#endif /* ARDUINO_BEARSSL_CONFIG_H_ */ diff --git a/examples/SHA256/ArduinoBearSSLConfig.h b/examples/SHA256/ArduinoBearSSLConfig.h deleted file mode 100644 index 160fc22..0000000 --- a/examples/SHA256/ArduinoBearSSLConfig.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef ARDUINO_BEARSSL_CONFIG_H_ -#define ARDUINO_BEARSSL_CONFIG_H_ - -/* Enabling this define allows the usage of ArduinoBearSSL without crypto chip. */ -//#define ARDUINO_DISABLE_ECCX08 - -#endif /* ARDUINO_BEARSSL_CONFIG_H_ */ diff --git a/examples/WiFiSSLClient/ArduinoBearSSLConfig.h b/examples/WiFiSSLClient/ArduinoBearSSLConfig.h deleted file mode 100644 index 160fc22..0000000 --- a/examples/WiFiSSLClient/ArduinoBearSSLConfig.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef ARDUINO_BEARSSL_CONFIG_H_ -#define ARDUINO_BEARSSL_CONFIG_H_ - -/* Enabling this define allows the usage of ArduinoBearSSL without crypto chip. */ -//#define ARDUINO_DISABLE_ECCX08 - -#endif /* ARDUINO_BEARSSL_CONFIG_H_ */ diff --git a/examples/extras/WiFiSSLClientNoSNI/ArduinoBearSSLConfig.h b/examples/extras/WiFiSSLClientNoSNI/ArduinoBearSSLConfig.h deleted file mode 100644 index 160fc22..0000000 --- a/examples/extras/WiFiSSLClientNoSNI/ArduinoBearSSLConfig.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef ARDUINO_BEARSSL_CONFIG_H_ -#define ARDUINO_BEARSSL_CONFIG_H_ - -/* Enabling this define allows the usage of ArduinoBearSSL without crypto chip. */ -//#define ARDUINO_DISABLE_ECCX08 - -#endif /* ARDUINO_BEARSSL_CONFIG_H_ */ From ed4f6ff31cc80c87e7e4a70bf68d6bdf7a55d4cd Mon Sep 17 00:00:00 2001 From: pennam Date: Wed, 5 Jun 2024 12:34:12 +0200 Subject: [PATCH 2/2] Document a working solution to disable ECCX08 --- README.adoc | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index 965379c..dffad05 100644 --- a/README.adoc +++ b/README.adoc @@ -10,8 +10,27 @@ image:https://github.com/{repository-owner}/{repository-name}/actions/workflows/ Port of https://bearssl.org[BearSSL] to Arduino. This library depends on ArduinoECCX08. This dependency could be -disabled by defining ARDUINO_DISABLE_ECCX08 in ArduinoBearSSLConfig.h -(see examples). +disabled by defining ARDUINO_DISABLE_ECCX08 in ArduinoBearSSLConfig.h. + +To do this create a configuration library called ArduinoBearSSLConfig with the +following file structure: + +``` +└── ArduinoBearSSLConfig/ + ├── src/ + │ └── ArduinoBearSSLConfig.h + └── library.properties +``` + +ArduinoBearSSLConfig.h +``` +#pragma once +#define ARDUINO_DISABLE_ECCX08 +``` +library.properties +``` +name=ArduinoBearSSLConfig +``` == License ==