I have OpenSsl installed and have a key and cert file specified in the Environment Variables.
SSLEAY_VERSION OpenSSL 1.0.2r 26 Feb 2019
SSL_CERT_FILE C:\certs\client-2048.crt
SSL_CA_CERT_FILE C:\certs\cabundle.pem
SSL_CA_CERT_PATH C:\certs\
SSL_KEY_FILE C:\certs\client-2048.key
SSL_CIPHER_LIST ALL
SSL_VERIFY_CLIENT NO
SSL_VERIFY_SERVER NO
If I override some of the .z methods, I never get a ‘port open’ message: just a close after a second or two.
A simple TcpClient and SslStream C# app can connect to the socket straight away, so I suspect it has something to do with the OpenSSL version I have. I haven’t had any problems making https GET and POST requests or connecting to WSS websockets with this config, so not sure how to diagnose what’s going on here.
Would appreciate any hints in the right direction.
I have OpenSsl installed and have a key and cert file specified in the Environment Variables.
SSLEAY_VERSION OpenSSL 1.0.2r 26 Feb 2019
SSL_CERT_FILE C:\certs\client-2048.crt
SSL_CA_CERT_FILE C:\certs\cabundle.pem
SSL_CA_CERT_PATH C:\certs\
SSL_KEY_FILE C:\certs\client-2048.key
SSL_CIPHER_LIST ALL
SSL_VERIFY_CLIENT NO
SSL_VERIFY_SERVER NO
If I override some of the .z methods, I never get a ‘port open’ message: just a close after a second or two.
A simple TcpClient and SslStream C# app can connect to the socket straight away, so I suspect it has something to do with the OpenSSL version I have. I haven’t had any problems making https GET and POST requests or connecting to WSS websockets with this config, so not sure how to diagnose what’s going on here.
Would appreciate any hints in the right direction.
you can see that kdb+ detected the 8-byte msg header doesn’t match the ipc expected format. You’ll need a raw socket connection - there’s likely some c-code lurking around on the forums that will do that. It’s a shame that betfair don’t appear to offer a websocket interface.
There is a thread entitled Basic Socket Communications in the forum with raw socket code in C, but it doesn’t look like it links openssl anywhere and is written for Unix, so I’d need to port it to Windows.
I’ve been reading through https://code.kx.com/q/interfaces/c-client-for-q/ and got the following shared library example to compile in Windows eventually using the 32-bit version of q.lib and some pre-processor code in Visual Studio: http://www.timestored.com/kdb-guides/compile-load-c-dll. I got a C class using winsock2.h called by q and it’s attempting to connect to the socket, but incorporating all the SSL cert exchange etc in C is a bit beyond my grasp at the moment.
I’ll return to this if a websocket becomes an option, but it looks like I’ll have to just stick to the C# client I have for now and send the data to q with qSharp.