View Issue Details

IDProjectCategoryView StatusLast Update
0001079unrealinstallingpublic2003-09-06 20:07
Reportersmj Assigned To 
PrioritynormalSeveritytweakReproducibilityalways
Status closedResolutionopen 
Product Version3.2-beta17 
Summary0001079: Patch for building w/ SSL on stock OpenBSD 3.3 (OpenSSL 0.9.7-beta3)
DescriptionI've seen some reports (0001025, 1014, 1074) about problems building with OpenSSL on OpenBSD. I built Unreal 3.2b12 on OpenBSD/x86 3.1 with no trouble and ran for several months. In replacing the hardware I tried to build Unreal 3.2b17 on OpenBSD 3.3 and saw the same failure as 0001025.

The problem is indeed related to OpenSSL - stock OBSD 3.3 includes OpenSSL 0.9.7-beta3, for whatever reason. The OpenSSL header file openssl/evp.h no longer #includes two files that it apparently used to. Here's a patch to Unreal's struct.h to work around it in case you can't upgrade OpenSSL:

28 fpe% diff -c include/struct.h.orig include/struct.h
*** include/struct.h.orig Fri Jun 27 11:48:58 2003
--- include/struct.h Tue Jun 17 15:30:31 2003
***************
*** 35,40 ****
--- 35,44 ----
  #include <openssl/pem.h>
  #include <openssl/ssl.h>
  #include <openssl/err.h>
+ #ifdef OPENBSD33
+ #include <openssl/md5.h>
+ #include <openssl/ripemd.h>
+ #endif
  #include <openssl/evp.h>
  #include <openssl/rand.h>
  #endif
29 fpe%

You then need to add a '-DOPENBSD33' into the toplevel Makefile's CFLAGS and you can build just fine. Not sure if putting it in Makefile.in worked for me or not, I think it got munged by the configuration process.
Steps To ReproduceUnpack and build Unreal 3.2b12 or 3.2b17 on stock OpenBSD 3.3 box and you'll see errors per bug 0001025.
Additional InformationI can understand not wanting to add a lot of random #ifdef's to the code. Since OpenBSD doesn't seem to be a major platform, I won't expect to see this integrated. Just thought it might be handy for the FAQ, and in case someone else is searching the bug base.
3rd party modules

Activities

syzop

2003-06-29 01:56

administrator   ~0003127

Maybe strictly we are at fault because we do not include those header files. A bit strange it works ok at all other supported platforms, however. If this doesn't break anything it might get added (not ifdef'ed). I'm working at other stuff ATM.

smj

2003-06-29 14:48

reporter   ~0003128

I don't see how this can be your "fault." But if you want folks to be able to build on OBSD 3.3 out of the box, sure, you may want to add a workaround or at least include a patch in the doc dir and FAQ. Also there's some question about the version being reported, see third paragraph.

I just checked a FreeBSD box (4.8-STABLE) with OpenSSL 0.9.7a, my OBSD 3.1 box with OpenSSL 0.9.6b, and compared their evp.h headers to OBSD 3.3's with OpenSSL 0.9.7-beta3. The "beta" version is missing a crucial section of #ifndef/#includes that take care of this, and a number of other headers. Maybe this is why I can't link my new Unreal3.2b17 server to the existing b12 server using option ssl... The later 0.9.7a version has the #ifndef/#includes again, using different names for the defines, so I think it was just something in motion as part of the .7 release. However...

A friend of mine who follows the OBSD mailing lists says he thinks that OBSD is using a "parallel" source tree for OpenSSL, so it isn't really stock 0.9.7-beta3 either. Perhaps that's where the header changes really originate, I don't know. And I wouldn't really expect every other project to track what the OpenBSD team is up to WRT every subsystem.

I'm about to start three weeks of on-the-road consulting work, but if you want to test a patch or workaround I can do it, or email me and we can setup details for a temporary login.

Thanks for the quick response,
--Steve.

syzop

2003-06-29 16:19

administrator   ~0003129

Yeah I know they use a stupid version (wether it's beta's or something else), but when I look at the openssl docs I see you have to include openssl/md5.h in order to use the MD5 functions for example, so it doesn't mention crypto.h/ssl.h/etc is enough ;). You are correct however that we usually don't use workarounds for stupid OSs/dists like RedHat or OpenBSD. No further help needed :P.

codemastr

2003-06-29 18:35

reporter   ~0003130

To be honest, I'd rather it didn't compile on OpenBSD right out of the box. Not because of anything against OpenBSD, it's because openssl-0.9.7-beta3 is exploitable. I really don't see why we should make a workaround to allow Unreal to work with an exploitable SSL library. In fact, I'm considering making it so if you try and run Unreal with an old version of OpenSSL it will spit out an "OpenSSL is too old" error. If people don't want to upgrade OpenSSL on their OpenBSD machines, that is their choice, but I don't see why, as a result, I should be forced to make Unreal support buggy exploitable code.

Issue History

Date Modified Username Field Change
2003-06-27 16:57 smj New Issue
2003-06-29 01:56 syzop Note Added: 0003127
2003-06-29 14:48 smj Note Added: 0003128
2003-06-29 16:19 syzop Note Added: 0003129
2003-06-29 18:35 codemastr Note Added: 0003130
2003-09-06 20:07 syzop Status new => closed