proposed patch for WINCE to the latest openssl cvs
valerino <xoanino <at> gmail.com>
2009-12-04 10:08:15 GMT
hi,
i've made this patch to compile the latest openssl cvs on WINCE. i've
succesfully compiled the these dlls on Windows Mobile 6.x :
04/12/2009 10:49 1.222.144 libeay32.dll
04/12/2009 10:49 258.560 ssleay32.dll
04/12/2009 10:49 12.288 4758cca.dll
04/12/2009 10:49 10.752 aep.dll
04/12/2009 10:49 8.704 atalla.dll
04/12/2009 10:49 13.824 cswift.dll
04/12/2009 10:49 4.096 gmp.dll
04/12/2009 10:49 15.360 chil.dll
04/12/2009 10:49 7.168 nuron.dll
04/12/2009 10:49 15.872 sureware.dll
04/12/2009 10:49 12.288 ubsec.dll
04/12/2009 10:49 4.096 padlock.dll
compiled using nmake -f /ms/cedll.mak using these patches (just a
bunch of includes and fixing outdated stuff like winsock.lib instead
of ws2.lib). I'm using the WceCompat library, of which i'm a
contributor, so my patches are only related to compiling on WINCE
using that libc extension.
regards,
valerio
===================================================================
RCS file: /v/openssl/cvs/openssl/e_os.h,v
retrieving revision 1.100
diff -u -r1.100 e_os.h
--- e_os.h 26 Aug 2009 15:15:14 -0000 1.100
+++ e_os.h 4 Dec 2009 04:58:56 -0000
<at> <at> -499,7 +499,8 <at> <at>
# endif
# if !defined(IPPROTO_IP)
/* winsock[2].h was included already? */
-# include <winsock.h>
+# include <winsock2.h>
+# include <ws2tcpip.h>
# endif
# ifdef getservbyname
# undef getservbyname
===================================================================
RCS file: /v/openssl/cvs/openssl/crypto/bio/bss_fd.c,v
retrieving revision 1.7
diff -u -r1.7 bss_fd.c
--- crypto/bio/bss_fd.c 12 Feb 2006 23:11:30 -0000 1.7
+++ crypto/bio/bss_fd.c 4 Dec 2009 05:15:31 -0000
<at> <at> -64,8 +64,26 <at> <at>
#if defined(OPENSSL_NO_POSIX_IO)
/*
* One can argue that one should implement dummy placeholder for
- * BIO_s_fd here...
+ * BIO_s_fd here... NEEDED for WINCE
*/
+ BIO *BIO_new_fd(int fd,int close_flag)
+ {
+ return NULL;
+ }
+ int BIO_fd_non_fatal_error(int err)
+ {
+ return 0;
+ }
+ int BIO_fd_should_retry(int i)
+ {
+ return 0;
+ }
+
+ BIO_METHOD *BIO_s_fd(void)
+ {
+ return NULL;
+ }
+
#else
/*
* As for unconditional usage of "UPLINK" interface in this module.
===================================================================
RCS file: /v/openssl/cvs/openssl/crypto/cms/cms.h,v
retrieving revision 1.29
diff -u -r1.29 cms.h
--- crypto/cms/cms.h 26 Nov 2009 18:57:39 -0000 1.29
+++ crypto/cms/cms.h 4 Dec 2009 05:10:10 -0000
<at> <at> -55,6 +55,7 <at> <at>
#ifndef HEADER_CMS_H
#define HEADER_CMS_H
+#include <e_os.h>
#include <openssl/x509.h>
#ifdef OPENSSL_NO_CMS
===================================================================
RCS file: /v/openssl/cvs/openssl/util/pl/VC-32.pl,v
retrieving revision 1.63
diff -u -r1.63 VC-32.pl
--- util/pl/VC-32.pl 19 Nov 2009 22:29:03 -0000 1.63
+++ util/pl/VC-32.pl 4 Dec 2009 07:20:22 -0000
<at> <at> -99,7 +99,7 <at> <at>
}
$cc='$(CC)';
- $base_cflags=' /W3 /WX /GF /Gy /nologo -DUNICODE -D_UNICODE
-DOPENSSL_SYSNAME_WINCE -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32
-DNO_CHMOD -DOPENSSL_SMALL_FOOTPRINT';
+ $base_cflags=' /W3 /GF /Gy /nologo -DUNICODE -D_UNICODE
-DOPENSSL_SYSNAME_WINCE -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32
-DNO_CHMOD -DOPENSSL_SMALL_FOOTPRINT';
$base_cflags.=" $wcecdefs";
$base_cflags.=' -I$(WCECOMPAT)/include' if (defined($ENV{'WCECOMPAT'}));
$base_cflags.=' -I$(PORTSDK_LIBPATH)/../../include' if
(defined($ENV{'PORTSDK_LIBPATH'}));
<at> <at> -143,12 +143,12 <at> <at>
$efile="/out:";
$exep='.exe';
if ($no_sock) { $ex_libs=''; }
-elsif ($FLAVOR =~ /CE/) { $ex_libs='winsock.lib'; }
+elsif ($FLAVOR =~ /CE/) { $ex_libs='ws2.lib'; }
else { $ex_libs='ws2_32.lib'; }
if ($FLAVOR =~ /CE/)
{
- $ex_libs.=' $(WCECOMPAT)/lib/wcecompatex.lib' if (defined($ENV{'WCECOMPAT'}));
+ $ex_libs.=' /NODEFAULTLIB:oldnames.lib coredll.lib corelibc.lib
$(WCECOMPAT)/lib/wcecompat.lib' if (defined($ENV{'WCECOMPAT'}));
$ex_libs.=' $(PORTSDK_LIBPATH)/portlib.lib' if
(defined($ENV{'PORTSDK_LIBPATH'}));
$ex_libs.=' /nodefaultlib:oldnames.lib coredll.lib corelibc.lib' if
($ENV{'TARGETCPU'} eq "X86");
}
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List openssl-dev <at> openssl.org
Automated List Manager majordomo <at> openssl.org