Closed artickl closed 1 year ago
This sounds like what https://github.com/simon-weber/gpsoauth/pull/51 addresses. In the meantime you should be able to downgrade urllib3.
Thank you @simon-weber ! Solution worked!
Sorry for not checking existing pull requests, just checked open issues, but may be for somebody else it will be useful too.
$ pip3 install urllib3\<=2
Successfully installed urllib3-1.26.16
$ pip list urllib3
Package Version
------------------ --------
async-timeout 4.0.2
certifi 2023.5.7
cffi 1.15.1
charset-normalizer 3.1.0
cryptography 41.0.1
ghome 0.0.3
glocaltokens 0.2.3
gpsoauth 1.0.2
grpcio 1.31.0
grpcio-tools 1.31.0
gyp 0.1
idna 3.4
ifaddr 0.2.0
pip 20.3.4
protobuf 3.20.3
pycparser 2.21
pycryptodomex 3.18.0
pyOpenSSL 23.2.0
python-nmap 0.7.1
requests 2.31.0
retrying 1.3.4
setuptools 52.0.0
simplejson 3.19.1
six 1.16.0
urllib3 1.26.16
wheel 0.34.2
zeroconf 0.63.0
$ python3 get_tokens.py
This script generates tokens that can be used when making requests to the Google Home Foyer API.
There are 2 kinds of tokens used here:
1. Master token - Is in the form `aas_et/***` and is long lived. Needs Google username and password.
2. Access token - Is in the form `ya29.***` and lasts for an hour. Needs Master token to generate.
If you do not want to store the Google account password in plaintext,
get the master token once, and set it as an override value.
It's safer/easier to generate an app password and use it instead of the actual password.
It still has the same access as the regular password, but still better than using the real password while scripting.
(https://myaccount.google.com/apppasswords)
[*] Getting master token...
[*] Master token: aas_et/************
[*] Getting access token...
[*] Access token: ya29.***************
[*] Done.
Looks like I was lucky before and this particular trick (downgrading urllib3) worked only because I had OpenSSL 1.1.1 there (Debian 11)
But on Ubuntu 22.04 with OpenSSL 3.0.2 running to https://github.com/simon-weber/gpsoauth/issues/48 issue...
So, looks like currently no workaround for systems with OpenSSL 3...
I think this was fixed by https://github.com/simon-weber/gpsoauth/pull/51 but I forgot to close it.
You're right that there's no fix for the openssl v3 issue yet. I haven't looked into it much but it doesn't look easy to debug.
When I'm running get_tokens.py which is using gpsoauth, the issue with ssl_.DEFAULT_CIPHERS occur in line: https://github.com/simon-weber/gpsoauth/blob/7f364c1a21c75e70d3ffd8ece87a4b47d2f5c51e/gpsoauth/__init__.py#L70