diff --git a/main/User_config.h b/main/User_config.h index df73eb8..3ac82d2 100644 --- a/main/User_config.h +++ b/main/User_config.h @@ -694,8 +694,10 @@ void storeSignalValue(uint64_t); # ifndef JSON_BLE_AES_CUSTOM_KEYS # define JSON_BLE_AES_CUSTOM_KEYS 256 // 42 byte BLE Custom Key * 6 rounded up to 256. # endif +// Runtime default for ble_aes[]. Empty = no default; override at build time +// with -DBLE_AES='"<32-hex-key>"' to ship a stock key. # ifndef BLE_AES -# define BLE_AES "00112233445566778899001122334455" +# define BLE_AES "" # endif # endif #endif diff --git a/main/config_WebContent.h b/main/config_WebContent.h index a535c2d..11d0369 100644 --- a/main/config_WebContent.h +++ b/main/config_WebContent.h @@ -294,8 +294,7 @@ const char config_ble_body_decoder[] = const char config_ble_body_encrypt[] = "
Encryption
" "BLE AES Default Key (32 char hex)
" - "" + "" "BLE Key Pairs
" "MacAddress:AESKey with space separator
" ""; diff --git a/main/gatewayBT.cpp b/main/gatewayBT.cpp index 02def11..1f4bf0c 100644 --- a/main/gatewayBT.cpp +++ b/main/gatewayBT.cpp @@ -1275,9 +1275,14 @@ void process_bledata(JsonObject& BLEdata) { if (ble_aes_keys.containsKey(macWOdots)) { THEENGS_LOG_TRACE(F("[BLEDecryptor] Custom AES key %s" CR), ble_aes_keys[macWOdots].as