1

I noticed that quickfix C++ version provides a way to encrypt the connection using certs through SSLSocketInitator and config file.

But I was not able to get this to work in python. How to create SSLSocketInitiator in python?

This is my current code which works for me without SSL, just plain socket initiator.

settings = fix.SessionSettings(fileName)
app = MyApplication()
storeFactory = fix.FileStoreFactory(settings)
logFactory = fix.FileLogFactory(settings)
initiator = fix.SocketInitiator(app, storeFactory, settings, logFactory)
initiator.start()
app.run()
Nick
  • 1,692
  • 3
  • 21
  • 35
  • What exactly do you mean by "doesn't work"? Are there any errors? What have you tried? – kichik Nov 27 '18 at 16:15
  • If i replace SocketInitiator with SSLSocketInitiator it says attribute not found error. I also changed config file to add SSL parameters, it doesnt work also. – Nick Nov 27 '18 at 16:16
  • Please add the complete exception and log. – kichik Nov 27 '18 at 16:17
  • initiator = fix.SSLSocketInitiator(app, storeFactory, settings, logFactory) AttributeError: 'module' object has no attribute 'SSLSocketInitiator' – Nick Nov 27 '18 at 16:18
  • Install quickfix-ssl (https://pypi.org/project/quickfix-ssl/) for fix.SSLSocketInitiator. – Jai Simha Ramanujapura May 06 '22 at 10:43

1 Answers1

0

I believe this isn't supported in the python quickfix implementation but you could use stunnel to provide the SSL. See Quickfix: How to use SSL in Python

Milage
  • 354
  • 2
  • 11