spohara79 / estreamer

SourceFire eStreamer python client libraries
Apache License 2.0
9 stars 4 forks source link

Connection failed : SSL verify callback #10

Open OlivierFrancais opened 6 years ago

OlivierFrancais commented 6 years ago

Hi I try to connect your example code with estreamer, but I've an issue with SSL connection :

+---------------+-----------+-------------------+----------------+
| name          | version   | author            | description    |
+---------------+-----------+-------------------+----------------+
| MSSQLPlugin   | 0.1       | Ted Papaioannou   | MSSQL writer   |
| PcapPlugin    | 0.1       | Sean O'Hara       | pcap writer    |
+---------------+-----------+-------------------+----------------+

Traceback (most recent call last):
  File "client.py", line 79, in <module>
    sys.exit(main())
  File "client.py", line 49, in main
    basedir + "client.crt", basedir + "priv.key") as ec:
  File "/home/ofrancai/dev/estreamer/local/lib/python2.7/site-packages/estreamer-0.1.1-py2.7.egg/estreamer/streamer.py", line 55, in __enter__
    self.ctx.set_verify(SSL.VERIFY_PEER, self.verify)
  File "/home/ofrancai/dev/estreamer/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 969, in set_verify
    raise TypeError("callback must be callable")
TypeError: callback must be callable

From the documentation of PyOpenSSL set_verify want a callback in second parameter and not a pem file path.

I'm doing something obviously wrong ?

spohara79 commented 6 years ago

Should be pointing to the validate_cert. I'll update and you can pull the newest to test