finish06 / pyunifi

https://unifi-sdn.ubnt.com/
MIT License
223 stars 99 forks source link

SSL Error #59

Closed Jeppedy closed 3 years ago

Jeppedy commented 3 years ago

Any idea why I'm getting an error related to SSL?

from pyunifi.controller import Controller

c = Controller('192.168.2.126', 'JeffHerr', 'XXXXXX') for ap in c.get_aps(): print('AP named %s with MAC %s', ap.get('name'), ap['mac'])

requests.exceptions.SSLError: HTTPSConnectionPool(host='192.168.2.126', port=8443): Max retries exceeded with url: /api/login (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))

I'm using a self-signed cert, I suppose, as I don't have a formal cert assigned.

finish06 commented 3 years ago

Try setting the SSL variable to False as default is true. Only officially signed certs are acceptable by default.

finish06 commented 3 years ago

Closing issue as no response.