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
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.