diff --git a/Makefile b/Makefile index a400823..c0f20f1 100644 --- a/Makefile +++ b/Makefile @@ -53,12 +53,21 @@ util: all-utils CONFIG_EXTRA_DEPENDENCIES= +CORE_CONFIG_DIR=core/config +CORE_CONFIG_FILE=$(CORE_CONFIG_DIR)/coreConfig.h + +# ! -e $(CORE_CONFIG_FILE) ] || ! cmp -s $(1)/coreConfig.h $(CORE_CONFIG_FILE) +define apply_core_config +@if [ ! -e $(CORE_CONFIG_FILE) ] || ! cmp -s $(1)/coreConfig.h $(CORE_CONFIG_FILE); then cp $(1)/coreConfig.h $(CORE_CONFIG_FILE); echo cp $(1)/coreConfig.h $(CORE_CONFIG_FILE); echo WARNING: Applied new configuration also to core. You may need to recompile the core.;fi +endef + +# ! -e $(CORE_CONFIG_FILE) ] || ! cmp -s $(1)/coreConfig.h $(CORE_CONFIG_FILE) +define apply_core_config_non_exist +@if [ ! -e $(CORE_CONFIG_FILE) ]; then cp $(1)/coreConfig.h $(CORE_CONFIG_FILE); echo cp $(1)/coreConfig.h $(CORE_CONFIG_FILE); echo WARNING: Applied new configuration also to core. You may need to recompile the core.;fi +endef + # Use default config if no config is being used. check-config: $(CONFIG_EXTRA_DEPENDENCIES) - @if [ ! -e core/coreConfig.h ];then \ - cp configs/default/coreConfig.h core/coreConfig.h;\ - echo NOTE: Using default configuration from configs/default/coreConfig.h.;\ - fi @if [ ! -e crypto/cryptoConfig.h ];then \ cp configs/default/cryptoConfig.h crypto/cryptoConfig.h;\ echo NOTE: Using default configuration from configs/default/cryptoConfig.h.;\ @@ -67,6 +76,7 @@ check-config: $(CONFIG_EXTRA_DEPENDENCIES) cp configs/default/matrixsslConfig.h matrixssl/matrixsslConfig.h;\ echo NOTE: Using default configuration from configs/default/matrixsslConfig.h.;\ fi + $(call apply_core_config_non_exist,configs/default) clean-config: rm -f core/coreConfig.h crypto/cryptoConfig.h matrixssl/matrixsslConfig.h @@ -74,9 +84,9 @@ clean-config: # Apply any of pre-existing configurations from configs directory %-config: configs/% $(CONFIG_EXTRA_DEPENDENCIES) @echo Using $MatrixSSL has been continuously maintained since 2002. It is the first open source small footprint SSL stack. Until recently, releases were tracked on http://freecode.com/projects/matrixssl

-

MatrixSSL is an embedded SSL and TLS implementation designed for small footprint IoT devices requiring low overhead per connection. The library is less than 50Kb on disk with cipher suites. It includes client and server support through TLS 1.2, mutual authentication, session resumption, and implementations of RSA, ECC, AES, SHA1, SHA-256 and more. The source is well documented and contains portability layers for additional operating systems, cipher suites, and cryptography providers.

+

MatrixSSL is an embedded SSL and TLS implementation designed for small footprint IoT devices requiring low overhead per connection. It includes client and server support through TLS 1.3, mutual authentication, session resumption, and implementations of RSA, ECC, AES, SHA1, SHA-256, ChaCha20-Poly1305 and more. The source is well documented and contains portability layers for additional operating systems, cipher suites, and cryptography providers.

Reporting Issues

@@ -23,9 +23,9 @@ Sensitive emails can be encrypted using the public key in this directory Features