mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-22 02:32:23 +00:00
More reduction (#5256)
* Now with even fewer ings * Ye * Mo * QMA6100PSensor
This commit is contained in:
@@ -190,7 +190,7 @@ CryptoKey Channels::getKey(ChannelIndex chIndex)
|
||||
k.length = channelSettings.psk.size;
|
||||
if (k.length == 0) {
|
||||
if (ch.role == meshtastic_Channel_Role_SECONDARY) {
|
||||
LOG_DEBUG("Unset PSK for secondary channel %s. using primary key", ch.settings.name);
|
||||
LOG_DEBUG("Unset PSK for secondary channel %s. use primary key", ch.settings.name);
|
||||
k = getKey(primaryIndex);
|
||||
} else {
|
||||
LOG_WARN("User disabled encryption");
|
||||
@@ -199,7 +199,7 @@ CryptoKey Channels::getKey(ChannelIndex chIndex)
|
||||
// Convert the short single byte variants of psk into variant that can be used more generally
|
||||
|
||||
uint8_t pskIndex = k.bytes[0];
|
||||
LOG_DEBUG("Expanding short PSK #%d", pskIndex);
|
||||
LOG_DEBUG("Expand short PSK #%d", pskIndex);
|
||||
if (pskIndex == 0)
|
||||
k.length = 0; // Turn off encryption
|
||||
else {
|
||||
@@ -384,7 +384,7 @@ bool Channels::hasDefaultChannel()
|
||||
bool Channels::decryptForHash(ChannelIndex chIndex, ChannelHash channelHash)
|
||||
{
|
||||
if (chIndex > getNumChannels() || getHash(chIndex) != channelHash) {
|
||||
// LOG_DEBUG("Skipping channel %d (hash %x) due to invalid hash/index, want=%x", chIndex, getHash(chIndex),
|
||||
// LOG_DEBUG("Skip channel %d (hash %x) due to invalid hash/index, want=%x", chIndex, getHash(chIndex),
|
||||
// channelHash);
|
||||
return false;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user