Re: [openssl.org #1790] [Patch] Windows CE 5 and following support

2008-11-24 Thread Maurice Kalinowski

Hi,

ext Roumen Petrov wrote:

Some notes about patch:
  

First, thank you for having a look at it.

- INSTALL.WCE
   "perl by MSYS" what is this ?
   If this is perl build from mingw32 project ? I can't found perl issue
in mingw32 bug tracker. Since the issue is not confirmed you can't write
that a package don't work.
  
Sorry, I meant the one from the mingw32 project. I use msysgit in my 
environment, thus I mixed up with the names. In any case, if I use that 
perl version, then nmake is not capable of parsing the generated 
makefiles. I can send a diff of both versions to this thread or create 
another request, if you prefer that.

- apps/ocsp.c
   why extra include of ? this mean that e_os.h patch is
incomplete.
  
I was tempted to add the include in e_os.h, but as this is the only file 
requiring this header I felt it to be much cleaner. If the general 
consensus is that e_os should be responsible for header inclusion 
ignoring that other files will use it for no purpose, I can change the 
patch accordingly.



- ms/do_ms.bat
   please keep changes minimal
  
There seemed to be a line-ending mixup or sth. It basically just adds 
"enable-experimental-jpake" to the WinCE makefile generator.

- util/pl/VC-32.pl
   please don't remove flags that affect warnings. WX->Wall ?
  
As stated in the mail, I needed to disable WX to have at least a 
successful compilation. WX treats warnings as errors and thus it will 
fail on two instances, where my knowledge about OpenSSL insides is 
limited. As already mentioned, I can send both compile warnings(errors) 
to this list and somebody can have a look at them.



   why is linked with crypt32 ?
  
The additional dependency results from using Cert* functions inside of 
engines/e_capi.c.


Best Regards,
Maurice Kalinowski


--
Maurice Kalinowski - maurice.kalinowski (AT) nokia.com
Software Engineer - Nokia, Qt Software
Rudower Chaussee 13, 12489 Berlin, Germany

__
OpenSSL Project http://www.openssl.org
Development Mailing List   openssl-dev@openssl.org
Automated List Manager   [EMAIL PROTECTED]


[openssl.org #1790] [Patch] Windows CE 5 and following support

2008-11-21 Thread Maurice Kalinowski via RT
Hi,

as offered in a previous discussion 
http://marc.info/?l=openssl-dev&m=122536319510494&w=2 I have updated the 
patch for Windows CE 5 and following support for the cvs repository, 
which represents the 0.9.9 version.

Please find attached the patch.

I would like to give some additional comments on it:
   * The documentation file (INSTALL.WCE) states that there is another 
version available using a 'PortSDK'. Unfortunately all links referring 
to it are dead by now. I did not touch the documentation/code as I am 
unsure how the project is going to handle this situation (remove it or 
try to contact the author?)
   * I removed the statement that static linking is not possible for 
Windows CE as that is wrong and most people actually use static linking 
on Windows CE to avoid memory fragmentation. I do not know anything 
about the situation when using PortSDK though due to above reasons.
   * The change in dso_win32 is only to avoid a warning about a unused 
variable on Windows CE.
   * I needed to enable experimental-jpake support by default. The 
mkdef.pl script does not seem to be able to disable the functions and 
thus a .def file gets generated containing the declarations. As a 
consequence linking fails due to undefined references. Maybe someone 
with a deeper knowledge about this part can help me out, so that there 
is no need to auto-enable experimental parts. Note that the 
jpaketest.exe also reports error currently.
   * Unfortunately I needed to remove the /WX option as two warnings 
about implicit casts are reported during compilation. In case someone is 
interested in it, feel free to ask me, I can send you the compile output.

Beside the jpaketest executable all other tests seem to pass.

If you have any questions, feel free to contact me.

Best Regards,
Maurice Kalinowski


-- 
Maurice Kalinowski - maurice.kalinowski (AT) nokia.com
Software Engineer - Nokia, Qt Software
Rudower Chaussee 13, 12489 Berlin, Germany


Index: INSTALL.WCE
===
RCS file: /v/openssl/cvs/openssl/INSTALL.WCE,v
retrieving revision 1.7
diff -d -u -r1.7 INSTALL.WCE
--- INSTALL.WCE 6 Nov 2005 20:52:25 -   1.7
+++ INSTALL.WCE 21 Nov 2008 14:10:56 -
@@ -4,14 +4,16 @@
 
  Building OpenSSL for Windows CE requires the following external tools:
 
-  * Microsoft eMbedded Visual C++ 3.0 or later
+  * Microsoft eMbedded Visual C++ 3.0 or Visual Studio 2005 and later
   * Appropriate SDK might be required
   * Perl for Win32 [commonly recommended ActiveState Perl is available
-from http://www.activestate.com/Products/ActivePerl/]
+from http://www.activestate.com/Products/ActivePerl/]. Note that
+perl by MSYS does not create correct makefiles.
 
   * wcecompat compatibility library available at
-http://www.essemer.com.au/windowsce/
-  * Optionally ceutils for running automated tests (same location)
+* www.essemer.com.au Windows CE 4.2 and earlier
+* github.com/mauricek/wcecompat all Windows CE versions
+  * Optionally ceutils for running automated tests (www.essemer.com.au)
 
   _or_
 
@@ -20,11 +22,7 @@
   * CMD command interpreter (same location)
 
  As Windows CE support in OpenSSL relies on 3rd party compatibility
- library, it's appropriate to check corresponding URL for updates. For
- example if you choose wcecompat, note that as for the moment of this
- writing version 1.2 is available and actually required for WCE 4.2
- and newer platforms. All wcecompat issues should be directed to
- www.essemer.com.au.
+ library, it's appropriate to check corresponding URL for updates.
 
  Why compatibility library at all? The C Runtime Library implementation
  for Windows CE that is included with Microsoft eMbedded Visual C++ is
@@ -35,6 +33,10 @@
  redirects IO to active sync link, while PortSDK - to NT-like console
  driver on the handheld itself.
 
+ With Windows CE 5 and following a lot of standard functionality has been
+ added to the core system, making some parts of the wcecompat lib deprecated.
+ More information is available at github.com/mauricek/wcecompat
+
  Building
  
 
@@ -43,6 +45,10 @@
 
  > "C:\Program Files\Microsoft eMbedded Tools\EVC\WCE300\BIN\WCEARM.BAT"
 
+ For Visual Studio 2005 and following there might be similar script depending
+ on the SDK OpenSSL is supposed to be build for. Follow the SDK documentation
+ to get more information how to setup a cross-compiler environment.
+
  Next pick compatibility library according to your preferences.
 
  1. To choose wcecompat set up WCECOMPAT environment variable pointing
@@ -51,6 +57,10 @@
 > set WCECOMPAT=C:\wcecompat
 > set PORTSDK_LIBPATH=
 
+ OpenSSL for Windows CE uses the same environment variables for compilation
+ as wcecompat does. Thus, there might be more settings needed. For more
+ information follow the wcecompat documentation.
+
  2. To choose PortSDK set up PORTSDK_LIBPATH to point

Re: Asynchronous WinCE socket I/O (using WSAEventSelect) with Openssl

2008-11-21 Thread Maurice Kalinowski

Hi,

ext irshad ahamed wrote:


Can I know how Asynchronous WinCE socket I/O ( using WSAEventSelect) 
can be achieved using Openssl?
The WSA* asynchronous hooks are all unavailable on Windows CE. This is 
very unfortunate, so you either have to reimplement them on your own, or 
find another workaround.


Best Regards,
Maurice Kalinowski


--
Maurice Kalinowski - maurice.kalinowski (AT) nokia.com
Software Engineer - Nokia, Qt Software
Rudower Chaussee 13, 12489 Berlin, Germany

__
OpenSSL Project http://www.openssl.org
Development Mailing List   openssl-dev@openssl.org
Automated List Manager   [EMAIL PROTECTED]


Re: [PATCH] Support Windows CE 5 and later

2008-11-05 Thread Maurice Kalinowski

Hi,

and sorry for my late reply, I just recognized per browsing the archive, 
that somebody took care about this topic already.



Patches should be sent to the request tracker so they don't get overlooked.

Ok, I will do so. Thank you for pointing this out.


Can you produce a version for the HEAD (OpenSSL 0.9.9-dev) too? 

I guess you mean from the CVS repository, right? I will give it a try beginning 
of next week and keep you updated about it per bugtracker then.


Best Regards,
Maurice.


--
Maurice Kalinowski - maurice.kalinowski (AT) nokia.com
Software Engineer - Nokia, Qt Software
Rudower Chaussee 13, 12489 Berlin, Germany

__
OpenSSL Project http://www.openssl.org
Development Mailing List   openssl-dev@openssl.org
Automated List Manager   [EMAIL PROTECTED]


[PATCH] Support Windows CE 5 and later

2008-10-30 Thread Maurice Kalinowski

Hi everyone,

please find attached a patch to update the Windows CE support to current 
versions (Windows CE 5 and 6) based on version 0.9.8i.


Most changes are related to the wcecompat lib, which defines an 
additional requirement for this platform. Unfortunately the maintainers 
did not respond to multiple contact mails for half a year, thus we were 
forced to fork the project to be able to provide updates. It is now 
hosted at github at following URL:


http://github.com/mauricek/wcecompat

Basically the patch consists of:
  * updated documentation (also some more details on setup)
  * a compile regression which seemed to have happened within one of 
the later versions of OpenSSL (o_str.c)

  * Windows CE 5 and later updates (mostly in the configuration script).

OpenSSL compiles for Windows CE 5 Standard SDK on all provided 
architectures (x86,mips, arm, etc.) and for Windows Mobile 5 and 6.


Tests were run on Windows CE 5 x86 and mips devices and they all pass.

If you have any questions or comments, feel free to contact me, 
otherwise I'd be delighted to see these updates in the next version of 
this project.



Best Regards,
Maurice Kalinowski


--
Maurice Kalinowski - maurice.kalinowski (AT) nokia.com
Software Engineer - Nokia, Qt Software
Rudower Chaussee 13, 12489 Berlin, Germany

diff -durw openssl-0.9.8i_original/INSTALL.WCE openssl-0.9.8i/INSTALL.WCE
--- openssl-0.9.8i_original/INSTALL.WCE Tue Oct  4 08:35:14 2005
+++ openssl-0.9.8i/INSTALL.WCE  Thu Oct 30 10:59:54 2008
@@ -4,18 +4,15 @@
 
  Building OpenSSL for Windows CE requires the following external tools:
 
-  * Microsoft eMbedded Visual C++ 3.0
-  * wcecompat compatibility library (www.essemer.com.au)
+  * Microsoft eMbedded Visual C++ 3.0 or Microsoft Visual Studio 2005 and later
+  * wcecompat compatibility library
+  * www.essemer.com.au Windows CE 4.2 and earlier
+  * github.com/mauricek/wcecompat all Windows CE versions
   * Optionally ceutils for running automated tests (www.essemer.com.au)
 
  You also need Perl for Win32.  You will need ActiveState Perl, available
- from http://www.activestate.com/ActivePerl.
-
- Windows CE support in OpenSSL relies on wcecompat and therefore it's
- appropriate to check http://www.essemer.com.au/windowsce/ for updates in
- case of compilation problems. As for the moment of this writing version
- 1.1 is available and actually required for WCE 4.2 and newer platforms.
- All Windows CE specific issues should be directed to www.essemer.com.au.
+ from http://www.activestate.com/ActivePerl. Note that perl by MSYS does
+ not create correct makefiles.
 
  The C Runtime Library implementation for Windows CE that is included with
  Microsoft eMbedded Visual C++ 3.0 is incomplete and in some places
@@ -26,6 +23,10 @@
  by the OpenSSL library itself but is used for the tests and openssl.exe.
  More information is available at www.essemer.com.au.
 
+ With Windows CE 5 and following a lot of standard functionality has been
+ added to the core system, making some parts of the wcecompat lib deprecated.
+ More information is available at github.com/mauricek/wcecompat
+
  Building
  
 
@@ -34,10 +35,18 @@
 
  > "C:\Program Files\Microsoft eMbedded Tools\EVC\WCE300\BIN\WCEARM.BAT"
 
+ For Visual Studio 2005 and following there might be similar script depending
+ on the SDK OpenSSL is supposed to be build for. Follow the SDK documentation
+ to get more information how to setup a cross-compiler environment.
+
  Next indicate where wcecompat is located:
 
  > set WCECOMPAT=C:\wcecompat
 
+ OpenSSL for Windows CE uses the same environment variables for compilation
+ as wcecompat does. Thus, there might be more settings needed. For more
+ information follow the wcecompat documentation.
+
  Next you should run Configure:
 
  > perl Configure VC-CE
@@ -61,8 +70,9 @@
> nmake -f ms\cedll.mak
 
  If all is well it should compile and you will have some static libraries and
- executables in out32, or some DLLs and executables in out32dll.  If you want
- to try the tests then make sure the ceutils are in the path and do:
+ executables in out32_xyz, or some DLLs and executables in out32dll_xyz where
+ xyz refers to the target processor architecture of the Windows CE SDK. 
+ If you want to try the tests then make sure the ceutils are in the path and 
do:
  
  > cd out32
  > ..\ms\testce
diff -durw openssl-0.9.8i_original/crypto/o_str.c openssl-0.9.8i/crypto/o_str.c
--- openssl-0.9.8i_original/crypto/o_str.c  Sat Mar 29 14:22:49 2008
+++ openssl-0.9.8i/crypto/o_str.c   Wed Oct 29 10:30:03 2008
@@ -60,7 +60,7 @@
 #include 
 #include "o_str.h"
 
-#if !defined(OPENSSL_IMPLEMENTS_strncasecmp) && !defined(OPENSSL_SYSNAME_WIN32)
+#if !defined(OPENSSL_IMPLEMENTS_strncasecmp) && 
!defined(OPENSSL_SYSNAME_WIN32) && !defined(OPENSSL_SYS_WINCE)
 # include 
 #endif
 
diff -durw openssl-0.9.8i_original/crypto/rsa/rsa_pss.c 
openssl-0.9.