RE: [PATCH] Windows CE support for 0.9.7 (against 20021114 snapshot)

2002-11-18 Thread Steven Reddie
No worries.  That should finish up the Windows CE port now.  Thanks for your
help.

Steven

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Richard Levitte - VMS
Whacker
Sent: Tuesday, 19 November 2002 12:00 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PATCH] Windows CE support for 0.9.7 (against 20021114
snapshot)


In message <[EMAIL PROTECTED]> on Mon, 18 Nov
2002 22:24:18 +1100, "Steven Reddie" <[EMAIL PROTECTED]> said:

smr> Since I'm using the MSVC++ /W3 /WX options (max warnings, treat
warnings as
smr> errors), the following two numbered lines in x509_vfy.c are giving
errors:
smr> time_t offset;
smr>807: offset= -offset;
smr>813: X509_time_adj(&atm,-offset*60, cmp_time);

Hmm, and now I realise I've been staring too much at 'time_t' without
looking at the rest of the code there.  offset isn't a measurement of
time since Epoch, so it's an error to pretend it's a time_t.  You're
absolutely correct in saying it should be a long.

Sorry for all the misdirected fuss...

BTW, did you not ask me about some function that calculates the
difference between to time_ts?  That function is difftime(), and it
returns a double.

--
Richard Levitte   \ Spannvägen 38, II \ [EMAIL PROTECTED]
Redakteur@Stacken  \ S-168 35  BROMMA  \ T: +46-8-26 52 47
\  SWEDEN   \ or +46-708-26 53 44
Procurator Odiosus Ex Infernis-- [EMAIL PROTECTED]
Member of the OpenSSL development team: http://www.openssl.org/

Unsolicited commercial email is subject to an archival fee of $400.
See <http://www.stacken.kth.se/~levitte/mail/> for more info.
__
OpenSSL Project http://www.openssl.org
Development Mailing List   [EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]

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



RE: [PATCH] Windows CE support for 0.9.7 (against 20021114 snapshot)

2002-11-18 Thread Steven Reddie
"Richard Levitte - VMS Whacker" said:

> time_t can be anything.  It can be a nose-picking monster for all I
> know.  All that matters is that it should represent time in some way,
> and be usefull in that way for any function that takes a time_t as an
> argument.  Under VMS (with DEC C), time_t is defined like this:
>
>  typedef __time_t time_t;
>
> and __time_t is defined like this:
>
>  typedef unsigned long int __time_t;

Ok, so unsigned isn't as uncommon as I thought.  Apparently
(http://mail-index.netbsd.org/port-alpha/1996/07/10/.html):

"time_t" is defined by ANSI/ISO 9899-1990 (7.12.1) as an "arithmetic
type capable of representing times".

Not only does the standard *not* say how big time_t is, it doesn't
even say if it is signed or unsigned. And the definition of "arithmetic
type" includes floats too.

> To represent time as a 64-bit blob, one could very well have this:
>
>  typedef struct { unsigned long t1, t2; } time_t;

The above reference says that this is impossible, but a "long long" or an
"int64" if the compiler supports it should be okay.

> That's why I'm asking you to tell me what problems you have with
> time_t.  It may be that some of the OpenSSL code does incorrect
> assumptions about time_t (for example assumes that it's a long), and
> therefore behaves incorrectly and should be corrected.

Since I'm using the MSVC++ /W3 /WX options (max warnings, treat warnings as
errors), the following two numbered lines in x509_vfy.c are giving errors:
 time_t offset;
807: offset= -offset;
813: X509_time_adj(&atm,-offset*60, cmp_time);

> I will simply *not* change time_t to long in OpenSSL.  That's going
> backwards.

Fair enough, I agree, but in this instance I think it's the right change
since the second parameter of X509_time_adj is a long.

> It doesn't make much sense to run VC from Cygwin either, or does it?

No, not from within a bash shell, though it could be done except for running
the batch files for the tests.  Since I have Cygwin installed and have it's
/bin directory in the Windows path, I use Cygwin's perl.  I'm sure this
isn't an unusual setup for anyone who uses Cygwin.  Yeah, maybe it just
makes it sound confusing to mention any of this :-)

> Anyway, I'm sorry for the harsch notes.  I think you've done a great
> job doing this Windows CE port.

No problem, no offence taken, I too want the code to be right.  Thanks for
all of your work to get these changes in.

Regards,

Steven

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



RE: [PATCH] Windows CE support for 0.9.7 (against 20021114 snapshot)

2002-11-17 Thread Steven Reddie
It may not necessarily be intuitive to CE developers either, it's just the
way I chose to do it because it integrates with an automated build system
better than the other choice.  Maybe appending the following to INSTALL.WCE
will make things clearer:

 This will copy each of the test programs to the Windows CE device and
execute
 them, displaying the output of the tests on this computer.  The output
should
 look similar to the output produced by running the tests for a regular
Windows
 build.

I've tried the latest snapshot and found that a time_t variable needs to be
changed to a long.  Windows CE's time_t is unsigned, whereas I think just
about every other platform must have it signed.  I'm pretty sure that
there's an ANSI or standard Unix function that takes or returns a time_t
that is an offset from another time_t, so it probably needs to be signed to
allow values before the other time.  Also, the infamous 2038 bug is due to a
signed time_t (unsigned would make it at least give us until 2106).  It's
the "offset = -offset" which causes the problem here.

Attached is a patch to 20021116 which changes this time_t to long and also
makes the output directories tmp32_$(TARGETCPU) and out32_$(TARGETCPU), eg.
tmp32_ARM and out32_ARM.  Chris, this means that you can do the following
steps to build for each processor (though I'd be surprised if most shops
need to build for all CPU's since Microsoft has started to drop support for
everything but the ARM):
perl Configure VC-CE (only do this once)
ms\do_ms.bat (only do this once)
"C:\Program Files\Microsoft eMbedded Tools\EVC\WCE300\BIN\WCEARM.BAT"
nmake -f ms\ce.mak
"C:\Program Files\Microsoft eMbedded Tools\EVC\WCE300\BIN\WCEMIPS.BAT"
nmake -f ms\ce.mak
"C:\Program Files\Microsoft eMbedded Tools\EVC\WCE300\BIN\WCEx86.BAT"
nmake -f ms\ce.mak

I left the comment in INSTALL.WCE (from INSTALL.W32) about Cygwin's perl
since it's a viable  option.  Even though I'm building in a regular Windows
command shell I'm using Cygwin's perl.  Maybe it's not worth mentioning
though; I'm sure anyone with Cygwin can work out that they don't really need
ActiveState's perl.

Steven

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Richard Levitte - VMS
Whacker
Sent: Saturday, 16 November 2002 8:43 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PATCH] Windows CE support for 0.9.7 (against 20021114
snapshot)


In message <[EMAIL PROTECTED]> on Sat, 16 Nov
2002 15:18:12 +1100, "Steven Reddie" <[EMAIL PROTECTED]> said:

smr> Everything is done from the Windows box.  The test*ce*.bat files use
cecopy
smr> to copy files to the device and cerun to invoke the test programs.  The
smr> output of the tests is redirected back through cerun, kind of like
using
smr> rsh.

Thanks.  I guess this should be rather clear if you're actually a CE
user :-).

smr> I'll look into the time_t problem and get back to you later today.

Thanks.

--
Richard Levitte   \ Spannvägen 38, II \ [EMAIL PROTECTED]
Redakteur@Stacken  \ S-168 35  BROMMA  \ T: +46-8-26 52 47
\  SWEDEN   \ or +46-708-26 53 44
Procurator Odiosus Ex Infernis-- [EMAIL PROTECTED]
Member of the OpenSSL development team: http://www.openssl.org/

Unsolicited commercial email is subject to an archival fee of $400.
See <http://www.stacken.kth.se/~levitte/mail/> for more info.
__
OpenSSL Project http://www.openssl.org
Development Mailing List   [EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]



openssl-0.9.7-stable-SNAP-20021116-windowsce.patch
Description: Binary data


RE: [PATCH] Windows CE support for 0.9.7 (against 20021114 snapshot)

2002-11-15 Thread Steven Reddie
Everything is done from the Windows box.  The test*ce*.bat files use cecopy
to copy files to the device and cerun to invoke the test programs.  The
output of the tests is redirected back through cerun, kind of like using
rsh.

I'll look into the time_t problem and get back to you later today.

Steven

-Original Message-
From: Richard Levitte - VMS Whacker [mailto:[EMAIL PROTECTED]]
Sent: Saturday, 16 November 2002 8:04 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PATCH] Windows CE support for 0.9.7 (against 20021114
snapshot)


OK, there are a couple of things that are unclear to me:

1. INSTALL.WCE is a very good description, although it should have
   Perl among the list of requirements at the beginning.  I can add
   that.  One thing is unclear, however: does one do everything on the
   WinCE device?  Or everything on a Windows box?  My theory is that
   there's a middle ground, where you build everything on a Windows
   box, then transfer the result to the WinCE device, and run the
   tests there.  Please give me a way to make this clear.

2. Where did you get that time_t couldn't be unsigned?  I assume that
   if you go with the unsigned value, you get build warnings.  If you
   could point those out, I'd be happier.

I'm gonna commit in a few minutes, *without* the changes re time_t.
If you coudl send further patches relative to that (i.e. snapshot
1115), it would be great.

--
Richard Levitte   \ Spannvägen 38, II \ [EMAIL PROTECTED]
Redakteur@Stacken  \ S-168 35  BROMMA  \ T: +46-8-26 52 47
\  SWEDEN   \ or +46-708-26 53 44
Procurator Odiosus Ex Infernis-- [EMAIL PROTECTED]
Member of the OpenSSL development team: http://www.openssl.org/

Unsolicited commercial email is subject to an archival fee of $400.
See <http://www.stacken.kth.se/~levitte/mail/> for more info.

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



RE: [PATCH] Windows CE support for 0.9.7 (against 20021114 snapshot)

2002-11-15 Thread Steven Reddie
Chris, thanks for taking the time to test the patch.  I'll take a look at
using the %TARGETCPU% to output built files to tmpARM, outARM, outdllARM
instead of tmp32, out32, out32dll.

Steven

-Original Message-
From: Chris Brook [mailto:[EMAIL PROTECTED]]
Sent: Saturday, 16 November 2002 8:18 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PATCH] Windows CE support for 0.9.7 (against 20021114
snapshot)


We have built Steven's "patch" successfully for PocketPC and PocketPC 2002.
The issue is the many different hardware versions it needs to be compiled
for.  With the makefile approach (Steven's), a separate build has to be done
for each CPU type - a somewhat labour-intensive exercise :-) Martin
Erdrich's patch included an MS project file that let one build all N
versions at one time. Any suggestions on how this can be handled in OpenSSL?
If one is only building a specific CPU, the makefile is fine, but most
developers/vendors will build for a larger set of CPU's.
Chris Brook


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Richard Levitte - VMS
Whacker
Sent: Friday, November 15, 2002 2:41 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PATCH] Windows CE support for 0.9.7 (against 20021114
snapshot)


Thanks!  Looks good for the most part, the only thing that's just
"non-traditional" is the direct use of OPENSSL_SYSNAME_WINCE, but
that's easily taken care of.

Oh, yeah, is there any reason to keep VC-CE.pl (as opposed to
util/pl/VC-CE.pl)?

--
Richard Levitte   \ Spannvägen 38, II \ [EMAIL PROTECTED]
Redakteur@Stacken  \ S-168 35  BROMMA  \ T: +46-8-26 52 47
\  SWEDEN   \ or +46-708-26 53 44
Procurator Odiosus Ex Infernis-- [EMAIL PROTECTED]
Member of the OpenSSL development team: http://www.openssl.org/

Unsolicited commercial email is subject to an archival fee of $400.
See <http://www.stacken.kth.se/~levitte/mail/> for more info.
__
OpenSSL Project http://www.openssl.org
Development Mailing List   [EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]


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



RE: [PATCH] Windows CE support for 0.9.7 (against 20021114 snapshot)

2002-11-15 Thread Steven Reddie
Richard,

I just noticed that you've commited the changes, and changed
OPENSSL_SYSNAME_WINCE, thanks.  Could you please replace util/pl/VC-CE.pl
with the one in the root directory, or just change the double quotes around
$lflags at line#16 with single quotes.

Regards,

Steven

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Steven Reddie
Sent: Saturday, 16 November 2002 2:51 PM
To: Richard Levitte - VMS Whacker; [EMAIL PROTECTED]
Subject: RE: [PATCH] Windows CE support for 0.9.7 (against 20021114
snapshot)


I thought that OPENSSL_SYSNAME_* was the new way of doing things, so I
changed the Microsoft standard UNDER_CE to OPENSSL_SYSNAME_WINCE at the last
minute.  I think I had to pull in e_os.h in one of the files to make sure
this was defined.  I'll change it all back.

Whoops, last-minute late-night mistake.  The file should be in util/pl, but
it's the one in the root directory that is the correct one to use.

I'll send a new patch later today.

Steven

-Original Message-
From: Richard Levitte - VMS Whacker [mailto:[EMAIL PROTECTED]]
Sent: Saturday, 16 November 2002 6:41 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PATCH] Windows CE support for 0.9.7 (against 20021114
snapshot)


Thanks!  Looks good for the most part, the only thing that's just
"non-traditional" is the direct use of OPENSSL_SYSNAME_WINCE, but
that's easily taken care of.

Oh, yeah, is there any reason to keep VC-CE.pl (as opposed to
util/pl/VC-CE.pl)?

--
Richard Levitte   \ Spannvägen 38, II \ [EMAIL PROTECTED]
Redakteur@Stacken  \ S-168 35  BROMMA  \ T: +46-8-26 52 47
\  SWEDEN   \ or +46-708-26 53 44
Procurator Odiosus Ex Infernis-- [EMAIL PROTECTED]
Member of the OpenSSL development team: http://www.openssl.org/

Unsolicited commercial email is subject to an archival fee of $400.
See <http://www.stacken.kth.se/~levitte/mail/> for more info.

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

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



RE: [PATCH] Windows CE support for 0.9.7 (against 20021114 snapshot)

2002-11-15 Thread Steven Reddie
I thought that OPENSSL_SYSNAME_* was the new way of doing things, so I
changed the Microsoft standard UNDER_CE to OPENSSL_SYSNAME_WINCE at the last
minute.  I think I had to pull in e_os.h in one of the files to make sure
this was defined.  I'll change it all back.

Whoops, last-minute late-night mistake.  The file should be in util/pl, but
it's the one in the root directory that is the correct one to use.

I'll send a new patch later today.

Steven

-Original Message-
From: Richard Levitte - VMS Whacker [mailto:[EMAIL PROTECTED]]
Sent: Saturday, 16 November 2002 6:41 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PATCH] Windows CE support for 0.9.7 (against 20021114
snapshot)


Thanks!  Looks good for the most part, the only thing that's just
"non-traditional" is the direct use of OPENSSL_SYSNAME_WINCE, but
that's easily taken care of.

Oh, yeah, is there any reason to keep VC-CE.pl (as opposed to
util/pl/VC-CE.pl)?

--
Richard Levitte   \ Spannvägen 38, II \ [EMAIL PROTECTED]
Redakteur@Stacken  \ S-168 35  BROMMA  \ T: +46-8-26 52 47
\  SWEDEN   \ or +46-708-26 53 44
Procurator Odiosus Ex Infernis-- [EMAIL PROTECTED]
Member of the OpenSSL development team: http://www.openssl.org/

Unsolicited commercial email is subject to an archival fee of $400.
See <http://www.stacken.kth.se/~levitte/mail/> for more info.

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



RE: [PATCH] Windows CE support for 0.9.7 (against 20021114 snapshot)

2002-11-15 Thread Chris Brook
We have built Steven's "patch" successfully for PocketPC and PocketPC 2002.
The issue is the many different hardware versions it needs to be compiled
for.  With the makefile approach (Steven's), a separate build has to be done
for each CPU type - a somewhat labour-intensive exercise :-) Martin
Erdrich's patch included an MS project file that let one build all N
versions at one time. Any suggestions on how this can be handled in OpenSSL?
If one is only building a specific CPU, the makefile is fine, but most
developers/vendors will build for a larger set of CPU's.
Chris Brook


-Original Message-
From: [EMAIL PROTECTED]
[mailto:owner-openssl-dev@;openssl.org]On Behalf Of Richard Levitte - VMS
Whacker
Sent: Friday, November 15, 2002 2:41 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PATCH] Windows CE support for 0.9.7 (against 20021114
snapshot)


Thanks!  Looks good for the most part, the only thing that's just
"non-traditional" is the direct use of OPENSSL_SYSNAME_WINCE, but
that's easily taken care of.

Oh, yeah, is there any reason to keep VC-CE.pl (as opposed to
util/pl/VC-CE.pl)?

--
Richard Levitte   \ Spannvägen 38, II \ [EMAIL PROTECTED]
Redakteur@Stacken  \ S-168 35  BROMMA  \ T: +46-8-26 52 47
\  SWEDEN   \ or +46-708-26 53 44
Procurator Odiosus Ex Infernis-- [EMAIL PROTECTED]
Member of the OpenSSL development team: http://www.openssl.org/

Unsolicited commercial email is subject to an archival fee of $400.
See <http://www.stacken.kth.se/~levitte/mail/> for more info.
__
OpenSSL Project http://www.openssl.org
Development Mailing List   [EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]

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



[PATCH] Windows CE support for 0.9.7 (against 20021114 snapshot)

2002-11-15 Thread Steven Reddie
Finally I've finished this port.  The patches are very minimal because the
majority of the work is in a seperate library available from my website
(www.essemer.com.au/windowsce/).

After applying the patch:
cd openssl-0.9.7-stable-SNAP-20021114
unzip openssl-0.9.7-stable-SNAP-20021114-windowsce.patch.zip
patch -Np1 < openssl-0.9.7-stable-SNAP-20021114-windowsce.patch
follow the build instructions in INSTALL.WCE.

I've only tested this on the Compaq iPaq (StrongARM).

Regards,

Steven



openssl-0.9.7-stable-SNAP-20021114-windowsce.patch.zip
Description: Zip compressed data