How to Execute openssl command from windows service

Hi,

I have created a windows service in Visual studio 2005 C++, which will encrypt a file and send it to a server using socket.

For this I am using OpenSSL, I am running in to following issues

1) I could not find the library method of OpenSSL which can be invoked to do the encryption, so I used System( ) to execute the command line OpenSSL
2) this works well in console application, but when I convert the application to windows service, System( ) is not executing
following gives me _get_errno(&err); '9' as the error.

Can someone suggest a way of executing OpenSSL using System( ) or even better the lib call for OpenSSL

Thanks in advance.
Vikas
Last edited on
The following might be a good starting point.
Secure Sockets Layer Protocol: http://msdn.microsoft.com/en-us/library/aa380124(VS.85).aspx
In all honesty, you probably just want to install putty's scp and run it yourself with CreateProcess.

I'd recomend not using the OpenSSL library directly. There are subtle changes to the syntax or signatures of functions with each release. Plus there were issues with different versions and compilers.

OpenSSL does ship with a number of compiled programs. Those are fine.
I am trying to automate the data collection, from a windows server.
that is why I am using Windows service
Topic archived. No new replies allowed.