Skip to content
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

Eliminate usage of crypt library #12

Closed
ekos2001 opened this issue Aug 3, 2020 · 3 comments
Closed

Eliminate usage of crypt library #12

ekos2001 opened this issue Aug 3, 2020 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@ekos2001
Copy link
Contributor

ekos2001 commented Aug 3, 2020

Because of the crypt library is not available on Windows, I'm receiving an error in HA
2020-08-03 00:45:40:0100 700 2020-08-03 00:45:39 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading configuration flow for integration homekit_controller: The crypt module is not supported on Windows

As I can see, it is used in one place only to generate a salt in the aiohomekit/aiohomekit/crypto/srp.py
salt = crypt.mksalt(crypt.METHOD_SHA512)[3:]

May be it can be replaced with different implementation?

@Jc2k Jc2k added the help wanted Extra attention is needed label Aug 3, 2020
@Jc2k
Copy link
Owner

Jc2k commented Aug 3, 2020

crypt is built in to python so it's a real shame they don't have an implementation on Windows. I suggested an alternative for homekit_python (the synchronous/blocking library aiohomekit was based off of) here. But I don't have Windows to test, and i've been struggling a bit for time.

Are you able to test the suggestion I made? Or even better submit a PR?

@ekos2001
Copy link
Contributor Author

ekos2001 commented Aug 5, 2020

I tested your suggestion and made PR #15

@Jc2k Jc2k closed this as completed in debfd6c Aug 5, 2020
@Jc2k
Copy link
Owner

Jc2k commented Aug 5, 2020

Thank you very much! I've merged this, and i'll do a release and get it into Home Assistant as soon as i can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants