cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

Python Script Broke after upgrading to 5.3.3

Hey all, python script to export the Encryption keys was working fine until we upgraded to 5.3.3.  Seems like it times out at random times.  Ive upgraded to python 3.6.5 and updated URLLIB3 and libraries.  I'm thinking it has something to do with TLS 1.2.  Error is below and any help would be appreciated!

 

MaxRetryError('HTTPSConnectionPool(host=\'EPOSERVER\', port=8443): Max retries
exceeded with url: /remote/eeadmin.exportMachineKey?machineName=MACHINEXXX1&o
ldKeys=True (Caused by SSLError(SSLError("bad handshake: Error([(\'SSL routines\
', \'ssl3_read_bytes\', \'tlsv1 alert internal error\')],)",),))',),)
Traceback (most recent call last):
  File "C:\Python36\lib\site-packages\urllib3\contrib\pyopenssl.py", line 441, i
n wrap_socket
    cnx.do_handshake()
  File "C:\Python36\lib\site-packages\OpenSSL\SSL.py", line 1907, in do_handshak
e
    self._raise_ssl_error(self._ssl, result)
  File "C:\Python36\lib\site-packages\OpenSSL\SSL.py", line 1639, in _raise_ssl_
error
    _raise_current_error()
  File "C:\Python36\lib\site-packages\OpenSSL\_util.py", line 54, in exception_f
rom_error_queue
    raise exception_type(errors)
OpenSSL.SSL.Error: [('SSL routines', 'ssl3_read_bytes', 'tlsv1 alert internal er
ror')]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Python36\lib\site-packages\urllib3\connectionpool.py", line 601, in u
rlopen
    chunked=chunked)
  File "C:\Python36\lib\site-packages\urllib3\connectionpool.py", line 346, in _
make_request
    self._validate_conn(conn)
  File "C:\Python36\lib\site-packages\urllib3\connectionpool.py", line 850, in _
validate_conn
    conn.connect()
  File "C:\Python36\lib\site-packages\urllib3\connection.py", line 326, in conne
ct
    ssl_context=context)
  File "C:\Python36\lib\site-packages\urllib3\util\ssl_.py", line 329, in ssl_wr
ap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "C:\Python36\lib\site-packages\urllib3\contrib\pyopenssl.py", line 448, i
n wrap_socket
    raise ssl.SSLError('bad handshake: %r' % e)
ssl.SSLError: ("bad handshake: Error([('SSL routines', 'ssl3_read_bytes', 'tlsv1
alert internal error')],)",)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Python36\lib\site-packages\requests\adapters.py", line 440, in send
    timeout=timeout
  File "C:\Python36\lib\site-packages\urllib3\connectionpool.py", line 639, in u
rlopen
    _stacktrace=sys.exc_info()[2])
  File "C:\Python36\lib\site-packages\urllib3\util\retry.py", line 388, in incre
ment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='EPOSERVER', port=844
3): Max retries exceeded with url: /remote/eeadmin.exportMachineKey?machineName=
MACHINEXXX1&oldKeys=True (Caused by SSLError(SSLError("bad handshake: Error([
('SSL routines', 'ssl3_read_bytes', 'tlsv1 alert internal error')],)",),))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "exportkeys.py", line 98, in <module>
    xml, key = retrieve_key(server, port, (computer_name, unique_id), username,
password, "mcafee")
  File "exportkeys.py", line 71, in retrieve_key
    xml = get_xml_response(server, port, (computer_name, unique_id), username, p
assword, encryption_manager)
  File "exportkeys.py", line 51, in get_xml_response
    res = requests.get(url, auth=(username, password), verify=False)
  File "C:\Python36\lib\site-packages\requests\api.py", line 72, in get
    return request('get', url, params=params, **kwargs)
  File "C:\Python36\lib\site-packages\requests\api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "C:\Python36\lib\site-packages\requests\sessions.py", line 508, in reques
t
    resp = self.send(prep, **send_kwargs)
  File "C:\Python36\lib\site-packages\requests\sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "C:\Python36\lib\site-packages\requests\adapters.py", line 506, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='EPOSERVER', port=8443):
Max retries exceeded with url: /remote/eeadmin.exportMachineKey?machineName=MACHINEXXX1
&oldKeys=True (Caused by SSLError(SSLError("bad handshake: Error([('SS
L routines', 'ssl3_read_bytes', 'tlsv1 alert internal error')],)",),))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "exportkeys.py", line 106, in <module>
    print(e.message)
AttributeError: 'SSLError' object has no attribute 'message'

More McAfee Tools to Help You

Community Help Hub

    New to the forums or need help finding your way around the forums? There's a whole hub of community resources to help you.

  • Find Forum FAQs
  • Learn How to Earn Badges
  • Ask for Help
Go to Community Help

Join the Community

    Thousands of customers use the McAfee Community for peer-to-peer and expert product support. Enjoy these benefits with a free membership:

  • Get helpful solutions from McAfee experts.
  • Stay connected to product conversations that matter to you.
  • Participate in product groups led by McAfee employees.
Join the Community
Join the Community