Hi All,
patch resubmitted WITH no attachment of zip file containing 2 useful
scripts to compile openssl on WCE and W32.
Anyway those 2 scripts are identical to those you can find on v100a for
WCE patch here : http://rt.openssl.org/index.html?q=2350
Yours sincerely
===========
Dear All,
I am a contributor to the WCE port of stunnel, using intensively openssl.
I have recently completed the port of stunnel v500b3 to WCE platform,
and needed a refreshed version of openssl for that target.
I have recompiled openssl v102snapshot20121213 with MS EVC4 sp4 free
compiler, MS
WCE420 SDK and essemer/wcecompat 1.2 library,
and fixed many compilation issues (mostly undefined symbols, a few
inexistant routines, some libs missing at link time).
I DID NOT fix any "operational" issue, ie execution-time issue.
My code is basically a PORTING effort, not at all a rewrite or enriching
effort. In particular I have a special concern to have wce code as close
as possible as win32 code.
JUST TO mention : the present patch is nearly but not exactly the
same as I did for v100a and described here
http://rt.openssl.org/index.html?q=2350
Please find enclosed my patch in "diff -ur orig patched" format.
FILES modified :
apps/apps.c
apps/apps.h
crypto/bio/bss_dgram.c
crypto/bio/bss_fd.c
crypto/cryptlib.c
crypto/dso/dso_win32.c
crypto/o_str.c
e_os.h
engines/ccgost/gost_lcl.h
engines/e_capi.c
ssl/d1_lib.c
util/pl/VC-32.pl
util/ssleay.num
FILES added :
./mywcebuild.bat, the main script to compile everything for a WCE
target, eg : mywcebuild ARMV4
./myw32build.bat, an equivalent convenient script for W32 build with MS
Visual Studio Express 9 (because I try to have same code for WCE and W32)
SUMMARY of fixes for compilation issues :
engines/e_capi.c:
for WCE only : (Note : see also different patch but more complicated at
: http://cvs.openssl.org/chngview?cn=20157)
a simple renaming trick for :
(my)CryptEnumProvidersA
(my)CryptAcquireContextA
(my)CryptSignHashA
has been coded to avoid a compiler warning..
./apps/apps.c:
strings.h is not relevant in WCE environment.
./apps/apps.h
FD_SET must include proper cast for WCE, as for win32.
NOTA: this cast should be corrected in the future to UNIT_PTR,
instead of "unsigned int", as it is defined like this in the MS SDK.
./crypto/bio/bss_dgram.c
get_current_time NEEDED a WCE code,
as _ftime DOES NOT exist in WCE420 SDK.
Nota: one day my code should go in wcecompat (I have to discuss with
Maurice Kalinowski about that, and about the replacement of wccompat 1.2
by mauricek or alike version).
./crypto/bio/bss_fd.c
some functions ARE missing definition for WCE.
BIO *BIO_new_fd(int fd,int close_flag)
int BIO_fd_non_fatal_error(int err)
int BIO_fd_should_retry(int i)
BIO_METHOD *BIO_s_fd(void)
By default I put a stub.
Is it sufficient ? at least it works with stunnel.
./crypto/cryptlib.c
"raise" DOES NOT exist in WCE environment.
Nota: In win32 _exit(3) is redundant with raise(sigabrt),
because raise implies exit(3), dixit MS doc.
./crypto/dso/dso_win32.c
len=0 just put to AVOID a warning of the compiler
because this variable is NOT used in CE code.
./crypto/o_str.c
strings.h is not relevant in WCE environment.
./crypto/opensslconf.h : no need of any explanation, automatically
generated file.
./e_os.h
"winsock2/ws2tcp" includes ARE needed in WCE environment.
EACCES symbol must be defined in WCE: fix would have to be included in
wcecompat stream one day.
./engines/ccgost/gost_lcl.h
Missing type "off_t"
./engines/e_capi.c
In WCE SDK, only UNICODE version of some Crypt function exist.
But openssl explicitely uses ANSI fucntions.
So I offer some code for this :
CryptEnumProvidersA
CryptAcquireContextA
CryptSignHashA
These ARE NOT STUB, but code really doing something.
./Makefile
automatically generated, some lines changed due to change in VC-32.pl
./ssl/d1_lib.c
get_current_time needed to be defined with "real code", not stub.
Nota: This code is a DUPLICATE of bss_dgram.c code :
same function get_current_time, same code.
./util/pl/VC-32.pl
VERY IMPORTANT : strangely the link process was supposed to link with
winsock 1 lib !
It is a big error as all openssl code is using winsock2, which is much
more bsd compliant than winsock1.
So the linkage must be done with ws2.lib (which is for WCE what
ws2_32.lib is for win32).
crypt32.lib IS ALSO MANDATORY now in WCE port, as in win32.
NOTE : I would also suggest to modify the INSTALL.WCE file just to
mention EVC4 and wcecompat 1.2 instead of evc3 and wcecompat 1.1, and
also the fact that out32dll path is now out32dll_$(TARGETCPU)
VC-32.pl, for WCE :
* /machine: X86 (instead of IX86)
* opt_cflags/dbg_cflags: for X86 target, the correct flag is /ML, not /MC
* opt_cflags: /O1i replaced by /O1 /Oi, more clear...and because
grouping options is not clearly allowed in MS doc
* ex_libs: now includes winsock2 for wce (available since wce 4.1 !
dixit MS docs)
* ex_libs now includes explicitely COREDLL.LIB CORELIBC.LIB and
REJECT anyother default lib (such as libc!)
because other DO NOT make sense on wce, although MS doc says so,
and do not even exist ! (there is no libc in wce 420 sdk).
* multitarget/ multiple build support:
now I put a reference to wcecompat/lib/$(TARGETCPU)/wcecompatex.lib,
that EXPLICITELY contains TARGETCPU,
this allows easy multiple build, ie for multiple CPU, for WCE.
I adapted Essemer/wcecompat accordingly, you can download my patched
version here :
http://delaage.pierre.free.fr/contrib/wcecompat/wcecompat12_patched2X86.zip
util/ssleay.num :
regenerated with perl util/mkdef.pl crypto ssl update
bacause 3 symbols were missing to compile ssltest :
SSL_CTX_get_authz_data r
SSL_CTX_use_authz_file
SSL_SESSION_get_tlsext_authz_server_audit_proof
CREATED mywcebuild.bat : helper script to compile for every targetcpu
for WCE, this follows the general path
described in INSTALL.WCE. Just type commands like these :
mywcebuild ARMV4
mywcebuild ARMV4 clean
or with X86 as target etc...
to have what you want, without renaming or recompiling everything
when switching between various CPU.
Avoid repetitive pollution of environment when repeteadly run with
the same target.
CREATED myw32build.bat : helper script to compile for every targetcpu
for W32, this follows the general path
described in INSTALL.W32. Just type commands like these :
myw32build
myw32build clean
Avoid repetitive pollution of environment when repeteadly run.
THOSE TWO SCRIPTS are put in the attached zip, because bat files were
rejected by rt_openssl mail system.
NOTE 2 : just in case it may help, precompiled (patched) versions of
PREVIOUS
openssl v100a and stunnel v434 for ARMV4 processors/WCE420 platform,
are available at http://delaage.pierre.free.fr.
The v100a patch is described here :
http://rt.openssl.org/index.html?q=2350
THERE IS NOT YET precompiled V102snap for WCE at that time on my
webpage. It will come later.
But if my patch is included in the openssl mainstream, my webpage
will be useless (and it will be good like this).
The result works fine for HTC WM6 smartphones, and should work for WM5
phones.
Thank you very much for your work.
Yours sincerely,
Pierre Delaage
p
diff -ur orig/apps/apps.c patch1/apps/apps.c
--- orig/apps/apps.c 2012-12-04 19:00:52.000000000 +0100
+++ patch1/apps/apps.c 2012-12-13 20:15:19.477399000 +0100
@@ -118,7 +118,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#if !defined(OPENSSL_SYSNAME_WIN32) && !defined(NETWARE_CLIB)
+#if !defined(OPENSSL_SYSNAME_WIN32) && !defined(OPENSSL_SYSNAME_WINCE) &&
!defined(NETWARE_CLIB) /* pdelaage 20121213 */
#include <strings.h>
#endif
#include <sys/types.h>
diff -ur orig/apps/apps.h patch1/apps/apps.h
--- orig/apps/apps.h 2011-11-13 22:55:41.000000000 +0100
+++ patch1/apps/apps.h 2012-12-13 20:15:38.237917000 +0100
@@ -202,7 +202,8 @@
# endif
#endif
-#ifdef OPENSSL_SYSNAME_WIN32
+/* pdelaage 20121213 #ifdef OPENSSL_SYSNAME_WIN32 */
+#if defined(OPENSSL_SYSNAME_WIN32) || defined(OPENSSL_SYSNAME_WINCE)
# define openssl_fdset(a,b) FD_SET((unsigned int)a, b)
#else
# define openssl_fdset(a,b) FD_SET(a, b)
diff -ur orig/crypto/bio/bss_dgram.c patch1/crypto/bio/bss_dgram.c
--- orig/crypto/bio/bss_dgram.c 2012-08-14 12:00:24.000000000 +0200
+++ patch1/crypto/bio/bss_dgram.c 2012-12-13 14:33:30.746096500 +0100
@@ -1896,10 +1896,44 @@
static void get_current_time(struct timeval *t)
{
#ifdef OPENSSL_SYS_WIN32
+#ifndef OPENSSL_SYSNAME_WINCE /* pdelaage 20121213: for WCE, ftime does not
exist. */
+/* pdelaage 20121213: for openssl team: this code can be replaced by the WCE
code below, but I will not take that decision myself: as much as possible I
only deal with wce port without modiying existing code */
struct _timeb tb;
_ftime(&tb);
t->tv_sec = (long)tb.time;
t->tv_usec = (long)tb.millitm * 1000;
+#else /* pdelaage 20121213: WCE, code THAT IS OK with ALL WIN32 Os,, this is a
msg for ANdy Poliakov ap...@openssl.org*/
+/* pdelaage 20121213:: Andy, GetSystemTimeAsFileTime is not available on WCE,
but my code does the same */
+
+ SYSTEMTIME stmToday_l, stm19700101_l;
+ FILETIME ftmToday_l, ftm19700101_l;
+ ULARGE_INTEGER uliToday_l, uli19700101_l, uliElapsed_l;
+
+ stm19700101_l.wYear = 1970;
+ stm19700101_l.wMonth= 1;
+ stm19700101_l.wDay= 1;
+ stm19700101_l.wHour =0;
+ stm19700101_l.wMinute = 0;
+ stm19700101_l.wSecond =0;
+ stm19700101_l.wMilliseconds = 0;
+
+ GetLocalTime(&stmToday_l);
+
+ SystemTimeToFileTime(&stm19700101_l, &ftm19700101_l);
+ SystemTimeToFileTime(&stmToday_l, &ftmToday_l);
+
+ uli19700101_l.u.LowPart = ftm19700101_l.dwLowDateTime;
+ uli19700101_l.u.HighPart = ftm19700101_l.dwHighDateTime;
+
+ uliToday_l.u.LowPart = ftmToday_l.dwLowDateTime;
+ uliToday_l.u.HighPart = ftmToday_l.dwHighDateTime;
+
+
+ uliElapsed_l.QuadPart = uliToday_l.QuadPart - uli19700101_l.QuadPart;
+
+ t->tv_sec = (long) (uliElapsed_l.QuadPart / 10000000);
+ t->tv_usec = (long) ((uliElapsed_l.QuadPart % 10000000) / 10);
+#endif
#elif defined(OPENSSL_SYS_VMS)
struct timeb tb;
ftime(&tb);
diff -ur orig/crypto/bio/bss_fd.c patch1/crypto/bio/bss_fd.c
--- orig/crypto/bio/bss_fd.c 2006-02-13 00:11:30.000000000 +0100
+++ patch1/crypto/bio/bss_fd.c 2012-12-13 17:04:04.584886000 +0100
@@ -66,6 +66,27 @@
* One can argue that one should implement dummy placeholder for
* BIO_s_fd here...
*/
+
+ /* pdelaage 20121213: yes it is necessary 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.
Seulement dans patch1/crypto: buildinf.h
diff -ur orig/crypto/cryptlib.c patch1/crypto/cryptlib.c
--- orig/crypto/cryptlib.c 2012-09-17 20:00:23.000000000 +0200
+++ patch1/crypto/cryptlib.c 2012-12-13 12:24:46.385995000 +0100
@@ -919,8 +919,11 @@
abort();
#else
/* Win32 abort() customarily shows a dialog, but we just did that... */
+#ifndef _WIN32_WCE /* added by pdelaage 20121213 */
raise(SIGABRT);
- _exit(3);
+#else
+ _exit(3);/* pdelaage : for win32, this is redundant with
raise(sigabrt) */
+#endif
#endif
}
diff -ur orig/crypto/dso/dso_win32.c patch1/crypto/dso/dso_win32.c
--- orig/crypto/dso/dso_win32.c 2009-07-15 13:01:40.000000000 +0200
+++ patch1/crypto/dso/dso_win32.c 2012-12-13 12:29:19.807948000 +0100
@@ -690,7 +690,8 @@
CLOSETOOLHELP32SNAPSHOT close_snap;
MODULE32 module_first, module_next;
int len;
-
+ len = 0;/* pdelaage 20121213 WCE: to avoid blocking warning at
compilation */
+
if (addr == NULL)
{
union { int(*f)(void*,char*,int); void *p; } t =
diff -ur orig/crypto/o_str.c patch1/crypto/o_str.c
--- orig/crypto/o_str.c 2009-06-01 14:14:15.000000000 +0200
+++ patch1/crypto/o_str.c 2012-12-13 12:26:39.730303000 +0100
@@ -60,9 +60,12 @@
#include <e_os.h>
#include "o_str.h"
+/* pdelaage added WINCE on 20121213 */
+
#if !defined(OPENSSL_IMPLEMENTS_strncasecmp) && \
- !defined(OPENSSL_SYSNAME_WIN32) && \
- !defined(NETWARE_CLIB)
+!defined(OPENSSL_SYSNAME_WIN32) && \
+!defined(OPENSSL_SYSNAME_WINCE) && \
+!defined(NETWARE_CLIB)
# include <strings.h>
#endif
Seulement dans patch1/crypto: opensslconf.h
Seulement dans patch1/crypto: opensslconf.h.bak
diff -ur orig/e_os.h patch1/e_os.h
--- orig/e_os.h 2012-10-30 00:01:18.000000000 +0100
+++ patch1/e_os.h 2012-12-13 20:19:59.284685500 +0100
@@ -270,7 +270,7 @@
*/
# define _WIN32_WINNT 0x0400
# endif
-# if !defined(OPENSSL_NO_SOCK) && defined(_WIN32_WINNT)
+# if !defined(OPENSSL_NO_SOCK) && ( defined(_WIN32_WINNT) ||
defined(_WIN32_WCE)) /* pdelaage 20121213 added wce */
/*
* Just like defining _WIN32_WINNT including winsock2.h implies
* certain "discipline" for maintaining [broad] binary compatibility.
@@ -286,6 +286,14 @@
# include <stdio.h>
# include <stddef.h>
# include <errno.h>
+
+#ifdef _WIN32_WCE
+#ifndef EACCES
+#define EACCES 13 /* pdelaage 20121213, to be added in weccompat (but errno.h
disappeared from mauricek port, probably because of sdk 6 usage, I use sdk 420)
+ needed for apps.c compilation */
+#endif
+#endif
+
# include <string.h>
# ifdef _WIN64
# define strlen(s) _strlen31(s)
diff -ur orig/engines/ccgost/gost_lcl.h patch1/engines/ccgost/gost_lcl.h
--- orig/engines/ccgost/gost_lcl.h 2009-06-16 18:39:20.000000000 +0200
+++ patch1/engines/ccgost/gost_lcl.h 2012-12-13 17:58:12.248116000 +0100
@@ -18,6 +18,11 @@
#include <openssl/ec.h>
#include "gost89.h"
#include "gosthash.h"
+
+# ifdef OPENSSL_SYS_WINCE
+typedef long off_t;/* pdelaage 20121213, for WCE, this is an EMERGENCY add: to
be removed with mauricek wcecompat */
+# endif
+
/* Control commands */
#define GOST_PARAM_CRYPT_PARAMS 0
#define GOST_PARAM_MAX 0
diff -ur orig/engines/e_capi.c patch1/engines/e_capi.c
--- orig/engines/e_capi.c 2012-11-18 17:00:20.000000000 +0100
+++ patch1/engines/e_capi.c 2012-12-13 17:53:48.602881000 +0100
@@ -116,7 +116,95 @@
#include "e_capi_err.h"
#include "e_capi_err.c"
+#ifdef OPENSSL_SYSNAME_WINCE /* pdelaage20121213 : to move to wcecomapt one
day */
+BOOL WINAPI myCryptEnumProvidersA(
+ DWORD dwIndex,
+ DWORD *pdwReserved,
+ DWORD dwFlags,
+ DWORD *pdwProvType,
+ LPSTR pszProvName,
+ DWORD *pcbProvName
+)
+{
+BOOL cr_l = FALSE;
+
+DWORD cbProvNameW = 0;
+LPWSTR pszProvNameW = NULL;
+
+if (pszProvName == NULL)
+{ /* get length for future buffer */
+cr_l = CryptEnumProvidersW(dwIndex, pdwReserved, dwFlags, pdwProvType, NULL,
pcbProvName);
+}
+else /* len here is reliable */
+{
+cbProvNameW = (*pcbProvName) * sizeof(WCHAR);
+pszProvNameW = (LPWSTR) malloc(cbProvNameW);
+cr_l = CryptEnumProvidersW(dwIndex, pdwReserved, dwFlags, pdwProvType,
pszProvNameW, &cbProvNameW);
+
+/* convert back to Ascii */
+ WideCharToMultiByte(CP_ACP, 0, pszProvNameW, -1, pszProvName, *pcbProvName,
NULL, NULL);
+
+free(pszProvNameW);
+}
+
+return(cr_l);
+}
+
+
+BOOL WINAPI myCryptAcquireContextA(
+ HCRYPTPROV *phProv,
+ LPCSTR pszContainer,
+ LPCSTR pszProvider,
+ DWORD dwProvType,
+ DWORD dwFlags
+)
+{
+BOOL cr_l = FALSE;
+LPWSTR pszContainerW = NULL;
+LPWSTR pszProviderW = NULL;
+size_t aLen;
+
+
+if (pszContainer && (aLen=strlen(pszContainer)))
+{
+pszContainerW = (LPWSTR) malloc( (1+aLen) * sizeof(WCHAR) );
+MultiByteToWideChar(CP_ACP, 0, pszContainer, -1, pszContainerW, (int) ((1+
aLen)*sizeof(WCHAR)) );
+}
+
+if (pszProvider && (aLen=strlen(pszProvider)))
+{
+pszProviderW = (LPWSTR) malloc( (1+aLen) * sizeof(WCHAR) );
+MultiByteToWideChar(CP_ACP, 0, pszProvider, -1, pszProviderW, (int) ((1+
aLen)*sizeof(WCHAR)) );
+}
+
+cr_l = CryptAcquireContextW(phProv, pszContainerW, pszProviderW, dwProvType,
dwFlags);
+
+if (pszContainerW) free(pszContainerW);
+if (pszProviderW) free(pszProviderW);
+
+return(cr_l);
+}
+
+BOOL WINAPI myCryptSignHashA(
+ HCRYPTHASH hHash,
+ DWORD dwKeySpec,
+ LPCSTR sDescription, /* ascii version */
+ DWORD dwFlags,
+ BYTE *pbSignature,
+ DWORD *pdwSigLen
+)
+{
+return(CryptSignHashW(hHash, dwKeySpec, NULL, dwFlags, pbSignature,
pdwSigLen));
+}
+
+/* pdelaage 20121213: override wincrypt.h import names THAT REFER TO NOTHING
IN EVC LIBS !
+ and, at the same time, avoid compiler warnings for redefinition of symbols. */
+#define CryptEnumProvidersA myCryptEnumProvidersA
+#define CryptAcquireContextA myCryptAcquireContextA
+#define CryptSignHashA myCryptSignHashA
+
+#endif
static const char *engine_capi_id = "capi";
static const char *engine_capi_name = "CryptoAPI ENGINE";
Seulement dans patch1: inc32
Seulement dans patch1: Makefile
Seulement dans patch1: Makefile.bak
Seulement dans patch1: MINFO
Seulement dans patch1/ms: ce.mak
Seulement dans patch1/ms: cedll.mak
Seulement dans patch1/ms: libeay32.def
Seulement dans patch1/ms: nt.mak
Seulement dans patch1/ms: ntdll.mak
Seulement dans patch1/ms: ssleay32.def
Seulement dans patch1/ms: version32.rc
Seulement dans patch1: myw32build.bat
Seulement dans patch1: mywcebuild.bat
Seulement dans patch1: out32dll_ARMV4
diff -ur orig/ssl/d1_lib.c patch1/ssl/d1_lib.c
--- orig/ssl/d1_lib.c 2012-04-18 18:00:21.000000000 +0200
+++ patch1/ssl/d1_lib.c 2012-12-13 17:09:03.273776500 +0100
@@ -450,13 +450,47 @@
return dtls1_retransmit_buffered_messages(s);
}
-static void get_current_time(struct timeval *t)
+static void get_current_time(struct timeval *t) /* pdelaage 20121213 : this
code is a DUPLICATE of bss_dgram same name routine ! */
{
#ifdef OPENSSL_SYS_WIN32
+#ifndef OPENSSL_SYSNAME_WINCE /* pdelaage 20121213: for WCE, ftime does not
exist. */
+/* pdelaage 20121213: for openssl team: this code can be replaced by the WCE
code below, but I will not take that decision myself: as much as possible I
only deal with wce port without modiying existing code */
struct _timeb tb;
_ftime(&tb);
t->tv_sec = (long)tb.time;
t->tv_usec = (long)tb.millitm * 1000;
+#else /* pdelaage 20121213: WCE, code THAT IS OK with ALL WIN32 Os,, this is a
msg for ANdy Poliakov ap...@openssl.org*/
+/* pdelaage 20121213:: Andy, GetSystemTimeAsFileTime is not available on WCE,
but my code does the same */
+
+ SYSTEMTIME stmToday_l, stm19700101_l;
+ FILETIME ftmToday_l, ftm19700101_l;
+ ULARGE_INTEGER uliToday_l, uli19700101_l, uliElapsed_l;
+
+ stm19700101_l.wYear = 1970;
+ stm19700101_l.wMonth= 1;
+ stm19700101_l.wDay= 1;
+ stm19700101_l.wHour =0;
+ stm19700101_l.wMinute = 0;
+ stm19700101_l.wSecond =0;
+ stm19700101_l.wMilliseconds = 0;
+
+ GetLocalTime(&stmToday_l);
+
+ SystemTimeToFileTime(&stm19700101_l, &ftm19700101_l);
+ SystemTimeToFileTime(&stmToday_l, &ftmToday_l);
+
+ uli19700101_l.u.LowPart = ftm19700101_l.dwLowDateTime;
+ uli19700101_l.u.HighPart = ftm19700101_l.dwHighDateTime;
+
+ uliToday_l.u.LowPart = ftmToday_l.dwLowDateTime;
+ uliToday_l.u.HighPart = ftmToday_l.dwHighDateTime;
+
+
+ uliElapsed_l.QuadPart = uliToday_l.QuadPart - uli19700101_l.QuadPart;
+
+ t->tv_sec = (long) (uliElapsed_l.QuadPart / 10000000);
+ t->tv_usec = (long) ((uliElapsed_l.QuadPart % 10000000) / 10);
+#endif
#elif defined(OPENSSL_SYS_VMS)
struct timeb tb;
ftime(&tb);
Seulement dans patch1: tmp32dll_ARMV4
diff -ur orig/util/pl/VC-32.pl patch1/util/pl/VC-32.pl
--- orig/util/pl/VC-32.pl 2012-10-30 00:01:28.000000000 +0100
+++ patch1/util/pl/VC-32.pl 2012-12-13 16:47:48.904169500 +0100
@@ -86,7 +86,7 @@
$wcetgt = $ENV{'TARGETCPU'}; # just shorter name...
SWITCH: for($wcetgt) {
/^X86/ && do { $wcecdefs.=" -Dx86 -D_X86_ -D_i386_ -Di_386_";
- $wcelflag.=" /machine:IX86"; last; };
+ $wcelflag.=" /machine:X86"; last; }; #
pdelaage 20121213 : must be X86 not IX86
/^ARMV4[IT]/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt";
$wcecdefs.=" -DTHUMB -D_THUMB_"
if($wcetgt=~/T$/);
$wcecdefs.=" -QRarch4T -QRinterwork-return";
@@ -116,13 +116,15 @@
$base_cflags.=" $wcecdefs";
$base_cflags.=' -I$(WCECOMPAT)/include' if
(defined($ENV{'WCECOMPAT'}));
$base_cflags.=' -I$(PORTSDK_LIBPATH)/../../include' if
(defined($ENV{'PORTSDK_LIBPATH'}));
- if (`cl 2>&1` =~ /Version 1[4-9]\./) {
+ if (`cl 2>&1` =~ /Version 1[4-9]\./) { #pdelaage 20121213 : question is
this cl ? as for X86 tgt, or $(CC) ??? evc4 gives version 12...
$base_cflags.=($shlib and !$fipscanisterbuild)?' /MD':' /MT';
} else {
- $base_cflags.=' /MC';
+ $base_cflags.=' /MC ' if ($wcetgt !~ /^X86/); # pdelaage 20121213 MC
flags supported by most CLxxx except X86. BEWARE that MC means DIFFERENT thing
vs tgt !
+ $base_cflags.=' /ML ' if ($wcetgt =~ /^X86/); # pdelaage 20121213
link to libc but in fact is just a fake...(!)
}
- $opt_cflags=' /O1i'; # optimize for space, but with intrinsics...
- $dbg_clfags=' /Od -DDEBUG -D_DEBUG';
+# pdelaage 20121213 $opt_cflags=' /O1i'; # optimize for space, but with
intrinsics...
+ $opt_cflags=' /O1 /Oi';# pdelaage 20121213 , (to make it more clear,
modified as separate options) , optimize for space, but with intrinsics...
+ $dbg_cflags=' /Od -DDEBUG -D_DEBUG';# pdelaage 20121213 .= operator;
bad WORD cLfags replaced by CFLAGS !!
$lflags="/nologo /opt:ref $wcelflag";
}
else # Win32
@@ -166,14 +168,18 @@
$efile="/out:";
$exep='.exe';
if ($no_sock) { $ex_libs=''; }
-elsif ($FLAVOR =~ /CE/) { $ex_libs='winsock.lib'; }
+# pdelaage 20121213 ws2 is AVAILABLE for wce420 and above. 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.=' crypt32.lib'; # pdelaage 20121213
+ $ex_libs.=' $(WCECOMPAT)/lib/$(TARGETCPU)/wcecompatex.lib' if
(defined($ENV{'WCECOMPAT'})); # pdelaage 20121213 multi target build chain
(WCECOMPAT DO have multiple tgt libs, as openssl itself)
$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");
+# pdelaage 20121213 $ex_libs.=' /nodefaultlib:oldnames.lib coredll.lib
corelibc.lib' if ($ENV{'TARGETCPU'} eq "X86");
+ $ex_libs.=' /NODEFAULTLIB COREDLL.LIB CORELIBC.LIB '; # pdelaage
20121213 : for WCE, /MC /ML have in fact NO EFFECT as related libs are non
existent. if ($ENV{'TARGETCPU'} eq "X86");
+
}
else
{
diff -ur orig/util/ssleay.num patch1/util/ssleay.num
--- orig/util/ssleay.num 2012-04-07 23:00:24.000000000 +0200
+++ patch1/util/ssleay.num 2012-12-13 19:59:28.131062500 +0100
@@ -321,3 +321,10 @@
SSL_CTX_set_next_proto_sel_cb 361 EXIST:VMS:FUNCTION:NEXTPROTONEG
SSL_SESSION_get_compress_id 362 EXIST::FUNCTION:
SSL_get_sigalgs 363 EXIST::FUNCTION:TLSEXT
+SSL_use_authz 364 EXIST::FUNCTION:TLSEXT
+SSL_CTX_get_authz_data 365 EXIST::FUNCTION:TLSEXT
+SSL_CTX_use_authz 366 EXIST::FUNCTION:TLSEXT
+SSL_use_authz_file 367 EXIST::FUNCTION:STDIO,TLSEXT
+SSL_CTX_use_authz_file 368 EXIST::FUNCTION:STDIO,TLSEXT
+SSL_SESSION_get_tlsext_authz_server_audit_proof 369
EXIST:!VMS:FUNCTION:TLSEXT
+S_SES_get_tlsx_auz_srvr_aud_prf 369 EXIST:VMS:FUNCTION:TLSEXT