fix(idf): enable noise-c protocol name table for Noise_KKpsk2 - #129
Open
raine-works wants to merge 1 commit into
Open
raine-works wants to merge 1 commit into
raine-works wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When building
sendspin-cppfor ESP-IDF / ESPHome withesphome__noise-c, upstreamesphome__noise-chardcodesNOISE_USE_PROTOCOL_NAME_TABLE=0. This causesnoise-cto compilenames-single.c, which only registersNoise_NNpsk0(used by ESPHome's native API).When Music Assistant connects with
Noise_KKpsk2_25519_ChaChaPoly_SHA256,noise_handshakestate_new_by_name()fails withNOISE_ERROR_UNKNOWN_NAME(0x0202):Solution
CMakeLists.txt, inspect target definitions onesphome__noise-cand__idf_esphome__noise-c. RemoveNOISE_USE_PROTOCOL_NAME_TABLE=0and setNOISE_USE_PROTOCOL_NAME_TABLE=1, enabling the full protocol suite table.src/noise_session.cpp, log the error code returned bynoise_handshakestate_new_by_name()to aid diagnosis.Testing
Tested end-to-end on ESP32 hardware running ESPHome with ESP-IDF against Music Assistant. The
Noise_KKpsk2handshake completes successfully and activates encrypted transport: