This is a discussion on Re: Issues with OpenSSL implementation on Windows NT service application - Openssl ; Hi! > The same code does not work i.e. opening the certificate files, when I > try to execute from a Windows NT Service (Ours is an application > running as a service and that service in turn acts as ...
> The same code does not work i.e. opening the certificate files, when I
> try to execute from a Windows NT Service (Ours is an application
> running as a service and that service in turn acts as a TCP server
> which will open SSL ports for communication with client)
> The same set of APIs and certificates does not work
> (SSL_CTX_use_certificate_file & SSL_CTX_use_PrivateKey_file) from
> within a Windows NT service application).
> Also, when I try to get the latest SSL error numbers using API
> ERR_print_errors_fp, the entire application crashes.
> I am looking out for any architectural issues with OpenSSL when
> working with Windows NT service applications. If anyone has tried
> implementing OpenSSL in a Windows NT service, any help in this regard
> is highly appreciated.
I have found, in my own service development, that
current-working-directories are different when a service runs vs an
application. My own service can also be started as a console app and
each is given a different working directory. Consequently, you cannot
simply open "key.pem". You have to either _chdir() or open the file
with the full path.
Also, when running as a service you dont have a stdout, stderr, and
stdin. In my service, I redirected my output to a logfile.
Alternatively, the event log is another logical choice.
OpenSSL Project http://www.openssl.org
User Support Mailing List firstname.lastname@example.org
Automated List Manager email@example.com