-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
configure does not survive PKI keys #678
Comments
I'd like to mention that also the Python CLI has an issue with serializing public keys, which always converts them to a string or bytes, regardless of the input format. This should be fixed to ensure consistent behavior. Fixes:
All of these examples produce the same error.
In the example with: b'XXXXXXXXXXXXXXXXXXXXXXXXXX' it tries to add the b to the bytes The fix should also document how to add multiple admin keys as per meshtastic/web#315 |
The security.privateKey and security.publicKey fields are of type bytes, but the protobuf MessageToDict converts them to base64 encoded strings. When importing the config again, this is read as a string, which breaks the import. Instead, the value needs to be prefixed with "base64:", so the type handling logic on import kicks in and decodes the value to a bytes array again. Fixes: meshtastic#678
The security.privateKey and security.publicKey fields are of type bytes, but the protobuf MessageToDict converts them to base64 encoded strings. When importing the config again, this is read as a string, which breaks the import. Instead, the value needs to be prefixed with "base64:", so the type handling logic on import kicks in and decodes the value to a bytes array again. Fixes: meshtastic#678
In 2.5 (65305af), a configuration that has privateKey, publicKey, or adminKeys causes the cli to exit with:
Aborting due to: expected bytes, str found
It seems that MessageToDict() converts bytes to base64 strings that are saved in the config yaml but when these are are later loaded into a config to be sent a setattr() of a string to a bytes field causes an exception.
The text was updated successfully, but these errors were encountered: