-
Notifications
You must be signed in to change notification settings - Fork 42
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
No way to use the library at all with self-signed certificate on the UDM Pro #25
Comments
@desrod Thanks for the report. Can you provide a little information as to your environment (what OS, Python version and unificontrol version)? If you can provide info about the version of software on your UDM Pro that would also be helpful; Ubiquiti have been making a lot of changes recently so it's a bit of a moving target. |
Sure can! I've been chasing down some very weird issues with my UDMP, which is what led me to find this project.
The entire test script is:
I started with the IP statically defined, that didn't work, so I added an entry to |
Hello, I am running into same problem. Did anyone else find a solution or work-around? |
Hello, same here, tried different things and nothing worked. I have my own CA, root and unifi certs both generated by CA, whatever I tried to provide root or unifi cert I have the same error: '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)'))) |
For me this failed because the certificate is expired. According to the web browser, it is signed by The only workaround I found was to patch unifi.py and add a To suppress the warnings I also added following to my main script:
|
Despite what the ``ssl_self_signed.rst` document states, pinning does not work at all for the initial login. You can create the client object, but you can't use it to query the API of the UDMP at all.
This includes port 443 and 8443. The self-signed certificate is queried correctly and passed back in the request, but since the Python 'requests' library can't validate the SSL certificate, it fails with the below (common) SSL verify error:
Other than procuring an officially-signed, upstream SSL certificate that the standard host certificate chain will trust, this will not work. I did add the certificate directly from the controller to
/usr/local/share/ca-certificates/
and refreshed the cert chain, still no success.Is there a plan to support
verify=False
in the constructor, so this will work for those of us without an upstream SSL cert configured on our controllers?The text was updated successfully, but these errors were encountered: