python-hpilo icon indicating copy to clipboard operation
python-hpilo copied to clipboard

iLO2 : xmldata : python3 : [SSL: SSLV3_ALERT_BAD_RECORD_MAC] sslv3 alert bad record mac (_ssl.c:1056)

Open Antalis opened this issue 6 years ago • 0 comments

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`

Antalis avatar Apr 09 '19 14:04 Antalis