SDK openssl issue

Have a question about our Software Developer Kit? Ask them here.
Post Reply
xenic
Posts: 1185
Joined: Sun Jun 19, 2011 12:06 am

SDK openssl issue

Post by xenic »

We have been getting libopenssl updates at OS4Depot and through AmiUpdate for quite a while. The libopenssl header files are installed in the SDK:Local/common/include/openssl/ directory. However, there already exists an SDK:Include/include_h/openssl/ directory in the SDK. If someone compiles or ports a program with include lines like: #include <openssl/xxxx.h> without overriding the default search path on the GCC command line, they will be using a new openssl library with ancient openssl includes (used by amissl ?) dated 2005.

It seems to me like it might be wise for the SDK maintainers to rename the OS4 system openssl/ directory to something like "amiopenssl/" in the next SDK update. Anyone who is porting a program that uses openssl might want to check that they are getting the correct header files when they compile with OS4 system includes present.
AmigaOne X1000 with 2GB memory - OS4.1 FE
MickJT
Posts: 9
Joined: Sat Jun 18, 2011 2:51 pm

Re: SDK openssl issue

Post by MickJT »

I'm the one who has currently been maintaining the openssl port on OS4Depot (I hope it's satisfactory. I use a custom RAND_poll function). I haven't personally built anything against AmiSSL, but I'd imagine that it's much easier to just rename those directories when necessary, otherwise you'd have to modify the headers and source of every program you want to build against AmiSSL. I don't know how it is now, but when I first discovered the conflict, I noticed you could still build programs using the old headers, unless the program required a newer feature.
Last edited by MickJT on Tue Jan 14, 2014 4:53 am, edited 1 time in total.
xenic
Posts: 1185
Joined: Sun Jun 19, 2011 12:06 am

Re: SDK openssl issue

Post by xenic »

@MickJT
I misunderstood what the libopenssl AutoInstall script is doing. Since it appears to be renaming the SDK:Include/include_h/openssl directory, it would be AmiSSL that might be affected by using newer header files and not libopenssl using older header files. It just seems to me like there could eventually be problems. I suspect that this AmiSSL/libopenssl header issue might affect other Amiga platforms too. The only long-term solution I can think of is a new AmiSSL library with a different name and non-conflicting header file directory name. That's probably unlikely to happen. Hopefully, the OS4 Devs are aware that an SDK include directory is being renamed by a 3rd party addon library in case some problems arise.
AmigaOne X1000 with 2GB memory - OS4.1 FE
MickJT
Posts: 9
Joined: Sat Jun 18, 2011 2:51 pm

Re: SDK openssl issue

Post by MickJT »

There's a potential conflict either way. If people opt to install libopenssl and want to use it, the renaming is necessary. If people mistakenly install it as part of a batch update, then the dialog box (which doesn't block/halt anything) warns you so you can revert back if you wish. So, I think that's the best solution for now, to provide a warning that a directory has been renamed as part of the installation. Any other solution is going to require modifying the source of all past and future programs. If I remember correctly, if both directories exist, then include_h/openssl is favoured and used first.
Post Reply