-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
Problem with Openssl #831
Comments
I believe the OpenSSL version is good enough but it wasn't compiled with support for ed25519. How to fix that depends on your distribution. I have never done such an upgrade myself, so I can't really help that much. The distribution community is probably your best bet. |
I have meet the same situation: Logger: custom_components.apple_tv.config_flow Authentication problem The above exception was the direct cause of the following exception: Traceback (most recent call last): I upgrade my OpenSSL to OpenSSL 1.1.1g 21 Apr 2020, but it doesn't work |
@postlund how to solve this problem?Can you help me?Please give me some advice!Thank you very much! |
@kingtao1024 Your version of OpenSSL is probably new enough but it wasn't compiled with support for ed25519. I have never had to compile OpenSSL to fix this myself. But perhaps if you pass |
I am not sure how to use |
The problem isn't the python library, it's the version of OpenSSL shipped with your distribution (or however you run Home Assistant). |
OK,which version of OpenSSL do you recommend?I will try again. |
You should probably take the latest stable one. That's what I would have chosen. |
I have tried 1.1.1d, 1.1.1g, & google can't help me either. |
I recommend that you run via docker, that version works. |
I need use a normal distribution and not a docker with raspberry I have try to upgrade
any other idea? |
Can you paste the output you get when configuring OpenSSL? |
What configuration do you need? I have updated the version by updating the operating system, but if necessary I can try to compile it I try a generate a certifcate with this encryption openssl genpkey -algorithm ed25519 -outform PEM -out test25519.pem It doesn't seem like one that doesn't support this |
The version provided by the OS doesn't seem to support ES25519, so I guess you need to roll your own. I'm not sure which build system they use, but I think it's autoconf. So what's interesting is what |
this as a script for install #!/bin/bash -eu OPENSSL_VER=1.1.1g mkdir openssl try ? |
Sure, might work. But look at the output from |
./config zlib shared no-ssl3 ommand line (with current working directory = .):
Perl information:
Enabled features:
Disabled features:
Config target attributes:
Recorded environment:
Makevars:
NOTE: These variables only represent the configuration view. The build file build file:
build file templates:
|
I install homeassistant by HASSOS, and ATV integration going to work in Hassio. |
I would like to use my current installation , other idea? |
sorry |
I tried to find any descriptions regarding what needs to be done to "enable" it in OpenSSL, but couldn't find anything useful. I guess you can try to build your own and see what happens. I have never worked with OpenSSL so I'm kinda out of ideas. Maybe you can write a support issue if you can't get it to work when compiling yourself? |
Please see OP post which shows that this OpenSSL does support Ed22519 very well: #831 (comment)
Otherwise you'd get an error:
So I am pretty sure it has nothing to do with the OS-level OpenSSL but with the Python environment, probably the |
Ok, that wasn't very obvious to me. My best guess is multiple installations of OpenSSL exists, one of them supports ED25519 but the wrong one is loaded with the python interpreter? Or at least |
It is the default Debian Buster
Not sure how Python or cryptography access those exactly, I guess not the executable directly but via @maury77
While investigating the issue over in our repo, I found e.g.:
I'm not sure if this means that I then identified the exact function which is responsible for the "not supported" error message and it basically checks the OpenSSL version only against 1.1.1b: MichaIng/DietPi#3764 (comment) @maury77
I'm just trying this myself to see if HA even starts then or attempts to satisfy it's hardcoded dependency automatically 😉. |
GREAT!!! the problem was solved |
That is great and I am a bid pizzled why not more users ran into this since the cryptography version is hardcoded in HA. I'll open a PR to raise the version, at least a quick walk through the web UI doesn't show any issues. |
PR opened to request the update: home-assistant/core#40479 |
great! |
my ha also says ed25519 is not supported by this version of OpenSSL |
doesn't work on OpenSSL 1.1.1f, cryptography-3.3.1, python 3.9 |
Also, manual install did't work for me openssl/openssl#11227 |
remove python cache ./.cache/pip/wheels/ and reinstall cryptography fixes it |
I have the same issue, clearing cache and reinstalling won't help I'm getting ed25519 is not supported by this version of OpenSSL error message on pairing process |
What to investigate
Traceback (most recent call last):
File “/mnt/dietpi_userdata/homeassistant/deps/lib/python3.8/site-packages/pyatv/support/init.py”, line 29, in error_handler
return await func(*args, **kwargs)
File “/mnt/dietpi_userdata/homeassistant/deps/lib/python3.8/site-packages/pyatv/mrp/auth.py”, line 32, in start_pairing
self.srp.initialize()
File “/mnt/dietpi_userdata/homeassistant/deps/lib/python3.8/site-packages/pyatv/mrp/srp.py”, line 98, in initialize
self._signing_key = Ed25519PrivateKey.from_private_bytes(os.urandom(32))
File “/home/homeassistant/.pyenv/versions/3.8.0/lib/python3.8/site-packages/cryptography/hazmat/primitives/asymmetric/ed25519.py”, line 61, in from_private_bytes
raise UnsupportedAlgorithm(
cryptography.exceptions.UnsupportedAlgorithm: ed25519 is not supported by this version of OpenSSL.
the my version of openssl is
/usr/bin# openssl version
OpenSSL 1.1.1d 10 Sep 2019
Expected outcome
The text was updated successfully, but these errors were encountered: