-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
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
load_verify_locations
blocking I/O check needs an exception implemented for cadata
via check_allowed
#125993
Comments
You can wrap the call to |
It has been a very long since I was forced to do C at university but I can add the code in an executer job but that seems like a workaround to avoid the erroneous error flagging. |
it is not flagged as doing blocking IO, but it is detected that there is IO done (so it is not an assumption, it is a detected behavior).
The code you're referring to, does also make use of a function called Anyway, figuring out, what is doing IO at the end in some |
My understanding is that the blocking IO checks are based on their being a call to core/homeassistant/block_async_io.py Lines 157 to 165 in d9812f0
Or have I missed something in how the blocking IO checks are working? Hence the issue with Core, I am 99.99% certain that in this scenario the warning is wrong. |
Until now I thought it was based on real detected IO, was not aware, that there is a list of functions known to do IO 🙈 we could add a |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
Bumping this. It is still there in 2024.12. |
It looks like its true that |
load_verify_locations
blocking I/O check needs an exception implemented for cadata
via check_allowed
The problem
Use of
load_verify_locations
fromssl
is getting flagged as blocking IO even if the CA is actually being passed as a variable not read from disk.eg. if you have the equivalent of
this is flagged as blocking IO but should not be? Other uses of
load_verifiy_locations
will read from disk (cafile
orcapath
arguments)In practice this is normally done by a custom CA being uploaded in a config flow and stored in config rather than hardcoded as above but that is just showing the issue.
The docs (https://developers.home-assistant.io/docs/asyncio_blocking_operations/#load_verify_locations) say to use
homeassistant.util.ssl
for genericssl
(as that caches single context instances) however that only provides contexts to disable verification or use the default certificates. You can not use this for a custom CA.What version of Home Assistant Core has the issue?
core-2024.9.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
No response
Link to integration documentation on our website
https://developers.home-assistant.io/docs/asyncio_blocking_operations/#load_verify_locations
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: