Skip to content

Commit 6dd76bb

Browse files
committed
ECCX08Config: allow re-enabling ECC utilities checking if has been included from sketch
1 parent 4494969 commit 6dd76bb

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

src/ArduinoECCX08Config.h

+20-5
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,25 @@
1818
#ifndef ARDUINO_ECCX08_CONFIG_H
1919
#define ARDUINO_ECCX08_CONFIG_H
2020

21-
#define ECCX08_DISABLE_ASN1
22-
#define ECCX08_DISABLE_CSR
23-
#define ECCX08_DISABLE_JWS
24-
#define ECCX08_DISABLE_SSC
25-
#define ECCX08_DISABLE_PEM
21+
22+
#if defined __has_include
23+
/* Disable ECCX08 SSC if not explicitly included */
24+
#if !__has_include (<utility/ECCX08SelfSignedCert.h>)
25+
#define ECCX08_DISABLE_ASN1
26+
#define ECCX08_DISABLE_SSC
27+
#endif
28+
/* Disable ECCX08 JWS support if not explicitly included */
29+
#if !__has_include (<utility/ECCX08JWS.h>)
30+
#define ECCX08_DISABLE_JWS
31+
#endif
32+
/* Disable ECCX08 CSR support if not explicitly included */
33+
#if !__has_include (<utility/ECCX08CSR.h>)
34+
#define ECCX08_DISABLE_CSR
35+
#endif
36+
/* Disable ECCX08 PEM support if not explicitly included */
37+
#if !__has_include (<utility/PEMUtils.h>)
38+
#define ECCX08_DISABLE_PEM
39+
#endif
40+
#endif
2641

2742
#endif /* ARDUINO_ECCX08_CONFIG_H */

0 commit comments

Comments
 (0)