Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suggestions for deploying openSSL dlls

I made a simple application that uses Indy and requires OpenSSL dlls.

I am not going to write an installer for it, so I have 2 options:

1) deploy it by copying the application exe + libeay32.dll + ssleay32.dll in the same folder

2) put libeay32.dll and ssleay32.dll in the exe resources and extract them to the applicationpath on program start (but this can may be a problem in case I am running the exe on a windowsserver 2008 or windows vista and I used the Program Files folder to "deploy")

Can you comment on those techinques or suggest a better approach?

like image 898
LaBracca Avatar asked Jul 09 '10 13:07

LaBracca


1 Answers

You could stick with option 1) :D

Or, you could use a variation on number 2, but extract them to the application data path:

GetSpecialFolderPath(CSIDL_LOCAL_APPDATA))

and use

SetDLLDirectory(DirectoryPath:PWideChar) 

to specify where to load dll's from

Of course, to be perfectly honest, it's quicker just to write a simple installer!

Edit: Oh, and yes, as UnixShadow mentioned, hash the dll's so you can be sure that you're using the correct files!

like image 180
2 revs Avatar answered Oct 26 '22 04:10

2 revs