diff --git a/build-libssl.sh b/build-libssl.sh index d25d219..67f820d 100755 --- a/build-libssl.sh +++ b/build-libssl.sh @@ -70,16 +70,19 @@ do PLATFORM="iPhoneOS" fi + export CROSS_TOP="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer" + export CROSS_SDK="${PLATFORM}${SDKVERSION}.sdk" + echo "Building openssl-${VERSION} for ${PLATFORM} ${SDKVERSION} ${ARCH}" echo "Please stand by..." - export CC="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer/usr/bin/gcc -arch ${ARCH}" + export CC="${CROSS_TOP}/usr/bin/gcc -arch ${ARCH}" mkdir -p "${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk" LOG="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk/build-openssl-${VERSION}.log" - ./Configure BSD-generic32 --openssldir="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk" > "${LOG}" 2>&1 + ./Configure iphoneos-cross --openssldir="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk" > "${LOG}" 2>&1 # add -isysroot to CC= - sed -ie "s!^CFLAG=!CFLAG=-isysroot ${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer/SDKs/${PLATFORM}${SDKVERSION}.sdk !" "Makefile" + sed -ie "s!^CFLAG=!CFLAG=-isysroot ${CROSS_TOP}/SDKs/${CROSS_SDK} !" "Makefile" make >> "${LOG}" 2>&1 make install >> "${LOG}" 2>&1 diff --git a/include/openssl/opensslconf.h b/include/openssl/opensslconf.h index 17cecea..19a828a 100644 --- a/include/openssl/opensslconf.h +++ b/include/openssl/opensslconf.h @@ -2,6 +2,9 @@ /* WARNING: Generated automatically from opensslconf.h.in by Configure. */ /* OpenSSL was configured with the following options: */ +#ifndef OPENSSL_SYSNAME_iOS +# define OPENSSL_SYSNAME_iOS +#endif #ifndef OPENSSL_DOING_MAKEDEPEND @@ -83,8 +86,8 @@ #if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */ #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) -#define ENGINESDIR "/data/home/fschulze/dev/ios/OpenSSL-for-iPhone/bin/iPhoneSimulator5.1-i386.sdk/lib/engines" -#define OPENSSLDIR "/data/home/fschulze/dev/ios/OpenSSL-for-iPhone/bin/iPhoneSimulator5.1-i386.sdk" +#define ENGINESDIR "/Users/megastep/src/OpenSSL-for-iPhone/bin/iPhoneSimulator5.1-i386.sdk/lib/engines" +#define OPENSSLDIR "/Users/megastep/src/OpenSSL-for-iPhone/bin/iPhoneSimulator5.1-i386.sdk" #endif #endif @@ -115,14 +118,14 @@ * - Intel P6 because partial register stalls are very expensive; * - elder Alpha because it lacks byte load/store instructions; */ -#define RC4_INT unsigned int +#define RC4_INT unsigned char #endif #if !defined(RC4_CHUNK) /* * This enables code handling data aligned at natural CPU word * boundary. See crypto/rc4/rc4_enc.c for further details. */ -#undef RC4_CHUNK +#define RC4_CHUNK unsigned long #endif #endif @@ -130,7 +133,7 @@ /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a * %20 speed up (longs are 8 bytes, int's are 4). */ #ifndef DES_LONG -#define DES_LONG unsigned int +#define DES_LONG unsigned long #endif #endif @@ -150,12 +153,12 @@ #define CONFIG_HEADER_RC4_LOCL_H /* if this is defined data[i] is used instead of *data, this is a %20 * speedup on x86 */ -#define RC4_INDEX +#undef RC4_INDEX #endif #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) #define CONFIG_HEADER_BF_LOCL_H -#undef BF_PTR +#define BF_PTR #endif /* HEADER_BF_LOCL_H */ #if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)