iLO2 : xmldata : python3 : [SSL: SSLV3_ALERT_BAD_RECORD_MAC] sslv3 alert bad record mac (_ssl.c:1056)
Antalis opened this issue · comments
Antalis commented
In Python 3.7 , with ilo.xmldata(item='cpqkey')['key'] (hpilo version4.3) on iLO2, i have this issue :
socket error XXX.XXX.XXX.XXX : (SSLError(1, '[SSL: SSLV3_ALERT_BAD_RECORD_MAC] sslv3 alert bad record mac (_ssl.c:1056)'),)
That sounds like the issue n° #189 , i added in hpilo.py (for python 3 and iLO2, iLO3 & iLO4) this (it's not clean, it's more of a workaround than a solution) :
url = 'https://%s:%s/xmldata?item=%s' % (self.hostname, self.port, item)
if hasattr(ssl, 'create_default_context'):
ctx = ssl.create_default_context()
+ ciphers = "DH+HIGH:DES-CBC3-SHA"
+ ctx.set_ciphers(ciphers)
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE`