OpenKMIP / PyKMIP

A Python implementation of the KMIP specification.
Apache License 2.0
264 stars 133 forks source link

Constantly getting different SSL errors #680

Open skiddie0057 opened 2 years ago

skiddie0057 commented 2 years ago

Dear PyKMIP dev team and pyKMIP community

I've been trying to set up a server-client communication without any certificates, just to first-run everything. I've tried what you've specified in documentation, but no matter what i try i keep getting errors like these:

Client: Traceback (most recent call last): File "locate.py", line 13, in mm = c.locate(attributes=[f.create_attribute(enums.AttributeType.OBJECT_TYPE,enums.ObjectType.SYMMETRIC_KEY)]) File "/home/x/.local/lib/python3.8/site-packages/kmip/pie/client.py", line 41, in wrapper return function(self, *args, **kwargs) File "/home/x/.local/lib/python3.8/site-packages/kmip/pie/client.py", line 849, in locate result = self.proxy.locate( File "/home/x/.local/lib/python3.8/site-packages/kmip/services/kmip_client.py", line 816, in locate return self._locate(maximum_items=maximum_items, File "/home/x/.local/lib/python3.8/site-packages/kmip/services/kmip_client.py", line 1617, in _locate self._send_message(message) File "/home/x/.local/lib/python3.8/site-packages/kmip/services/kmip_client.py", line 1726, in _send_message self.protocol.write(stream.buffer) File "/home/x/.local/lib/python3.8/site-packages/kmip/services/kmip_protocol.py", line 40, in write self.socket.sendall(sbuffer) File "/usr/lib/python3.8/ssl.py", line 1204, in sendall v = self.send(byte_view[count:]) File "/usr/lib/python3.8/ssl.py", line 1173, in send return self._sslobj.write(data) ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:2485)

Server response (from log): 022-08-08 08:49:28,620 - kmip.server.session.00000053 - ERROR - [SSL] internal error (_ssl.c:1131) Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/kmip/services/server/session.py", line 102, in run self._connection.do_handshake() File "/usr/lib/python3.8/ssl.py", line 1309, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL] internal error (_ssl.c:1131) 2022-08-08 08:49:28,620 - kmip.server.session.00000053 - INFO - Stopping session: 00000053

-- My question is - Can this be done? Establishing it all without certificates, then adding certificates later - just to test things out? To be more precise my question is "is the SSL error my fault"

Please help me resolve this issue, i've tried everything with no results.

Kind regards,

Skiddie0057

skiddie0057 commented 2 years ago

2022-08-08 09:20:44,022 - kmip.server.session.00000059 - INFO - Failure running TLS handshake

skiddie0057 commented 2 years ago

Please someone help

I managed to make a script that does open() and close() / as well as in between it checks KMIP version - work well But the problem is whenever i do anything else - it gives ssl errors (often 2485) I dont think any firewall or anything similar is blocking me

Please help

skiddie0057 commented 2 years ago

I've resolved this by modifying my configs - now i have different errors : telling me certificate cant be verified - talking about extended key usage