[openssl.org #2459] ecdsa_method declaration prevents use in implementing a dynamic engine

2013-09-19 Thread Alon Bar-Lev via RT
Hi,

Any ETA for this?

Just wanted to note that finish is also required to allow cleaning up resources.

Any ETA on this? very important if we want to use ec based hardware
cryptography.

Thanks,
Alon Bar-Lev


__
OpenSSL Project http://www.openssl.org
Development Mailing List   openssl-dev@openssl.org
Automated List Manager   majord...@openssl.org


[openssl.org #2459] ecdsa_method declaration prevents use in implementing a dynamic engine

2013-09-18 Thread Alon Bar-Lev via RT
Hi,

Just wanted to note that finish is also required to allow cleaning up resources.

Any ETA on this? very important if we want to use ec based hardware
cryptography.

Thanks,
Alon Bar-Lev

__
OpenSSL Project http://www.openssl.org
Development Mailing List   openssl-dev@openssl.org
Automated List Manager   majord...@openssl.org


Re: [openssl.org #2282] AutoReply: [PATCH] Add PVK to usage of rsa and dsa commands

2012-03-17 Thread Alon Bar-Lev via RT
ping?
this should be trivial.


__
OpenSSL Project http://www.openssl.org
Development Mailing List   openssl-dev@openssl.org
Automated List Manager   majord...@openssl.org


[openssl.org #2282] [PATCH] Add PVK to usage of rsa and dsa commands

2010-06-02 Thread Alon Bar-Lev via RT
Although I knew PVK is supported... Could not find how to use it...

Tested on snapshot of 20100602.



openssl-1.0.0-pvk-usage.patch
Description: Binary data


Re: [openssl.org #2137] [PATCH] mingw fixups

2010-01-14 Thread Alon Bar-Lev via RT
You are right.
I tried latest snapshot and it compiles OK as far as mingw 32 and 64 concerned.
Had to fix some code in apps though, this why I don't use snapshots.

You can close this.

Alon

On Wed, Jan 13, 2010 at 11:28 PM, Roumen Petrov via RT  wrote:
> Hi Alon,
>
> Alon Bar-Lev via RT wrote:
>> Hello,
>>
>> I use i686-w64-mingw32...
>> We discussed this in past (I think) LEAN_AND_MEAN was added to win64
>> but not win32.
>>
>> As w64 compiler much more complete and maintained I use it to compile
>> win32 as-well.
>>
>> Alon.
>>
>> On Tue, Jan 12, 2010 at 11:14 PM, Roumen Petrov via RT  
>> wrote:
>>> Alon Bar-Lev via RT wrote:
>>>>
>>>> The following is required in order to make beta4 compile using mingw (w64).
>>>>
>>>> Every time there is #include    some symbols should be removed.
>>>> Also, there is no need to #include    if e_os2.h was included.
>>> [SNIP]
>>>
>>>> diff -urNp openssl-1.0.0-beta4.org/e_os.h openssl-1.0.0-beta4/e_os.h
>>>> --- openssl-1.0.0-beta4.org/e_os.h    2009-08-26 18:13:43.0 +0300
>>>> +++ openssl-1.0.0-beta4/e_os.h        2010-01-11 17:13:08.152360026 +0200
>>>> @@ -372,6 +372,13 @@ static unsigned int _strlen31(const char
>>>>    #    define DEFAULT_HOME  "C:"
>>>>    #  endif
>>>>
>>>> +#undef X509_NAME
>>>> +#undef X509_EXTENSIONS
>>>> +#undef X509_CERT_PAIR
>>>> +#undef PKCS7_ISSUER_AND_SERIAL
>>>> +#undef OCSP_REQUEST
>>>> +#undef OCSP_RESPONSE
>>>
>>> Why -DWIN32_LEAN_AND_MEAN don't work in you build ?
>>>
>>> Roumen
>
> Did you upgrade ? Lets check Configure updates:
> -
> ...
> revision 1.655
> date: 2009/12/30 11:46:53;  author: appro;  state: Exp;  lines: +1 -1
> Adapt mingw config for newer mingw environment. Note modified conditional
> compilation in e_capi.c.
> PR: 2113
> 
> -
>
> Roumen
>
>
>


__
OpenSSL Project http://www.openssl.org
Development Mailing List   openssl-dev@openssl.org
Automated List Manager   majord...@openssl.org


Re: [openssl.org #2137] [PATCH] mingw fixups

2010-01-12 Thread Alon Bar-Lev via RT
Hello,

I use i686-w64-mingw32...
We discussed this in past (I think) LEAN_AND_MEAN was added to win64
but not win32.

As w64 compiler much more complete and maintained I use it to compile
win32 as-well.

Alon.

On Tue, Jan 12, 2010 at 11:14 PM, Roumen Petrov via RT  wrote:
> Alon Bar-Lev via RT wrote:
>>
>> The following is required in order to make beta4 compile using mingw (w64).
>>
>> Every time there is #include  some symbols should be removed.
>> Also, there is no need to #include  if e_os2.h was included.
> [SNIP]
>
>> diff -urNp openssl-1.0.0-beta4.org/e_os.h openssl-1.0.0-beta4/e_os.h
>> --- openssl-1.0.0-beta4.org/e_os.h    2009-08-26 18:13:43.0 +0300
>> +++ openssl-1.0.0-beta4/e_os.h        2010-01-11 17:13:08.152360026 +0200
>> @@ -372,6 +372,13 @@ static unsigned int _strlen31(const char
>>   #    define DEFAULT_HOME  "C:"
>>   #  endif
>>
>> +#undef X509_NAME
>> +#undef X509_EXTENSIONS
>> +#undef X509_CERT_PAIR
>> +#undef PKCS7_ISSUER_AND_SERIAL
>> +#undef OCSP_REQUEST
>> +#undef OCSP_RESPONSE
>
> Why -DWIN32_LEAN_AND_MEAN don't work in you build ?
>
> Roumen
>
>
>


__
OpenSSL Project http://www.openssl.org
Development Mailing List   openssl-dev@openssl.org
Automated List Manager   majord...@openssl.org


[openssl.org #2137] [PATCH] mingw fixups

2010-01-12 Thread Alon Bar-Lev via RT

The following is required in order to make beta4 compile using mingw (w64).

Every time there is #include  some symbols should be removed.
Also, there is no need to #include  if e_os2.h was included.

---

diff -urNp openssl-1.0.0-beta4.org/crypto/rand/rand.h 
openssl-1.0.0-beta4/crypto/rand/rand.h
--- openssl-1.0.0-beta4.org/crypto/rand/rand.h  2008-11-12 05:58:04.0 
+0200
+++ openssl-1.0.0-beta4/crypto/rand/rand.h  2010-01-11 17:13:15.796020568 
+0200
@@ -63,10 +63,6 @@
 #include 
 #include 
 
-#if defined(OPENSSL_SYS_WINDOWS)
-#include 
-#endif
-
 #ifdef  __cplusplus
 extern "C" {
 #endif
diff -urNp openssl-1.0.0-beta4.org/e_os.h openssl-1.0.0-beta4/e_os.h
--- openssl-1.0.0-beta4.org/e_os.h  2009-08-26 18:13:43.0 +0300
+++ openssl-1.0.0-beta4/e_os.h  2010-01-11 17:13:08.152360026 +0200
@@ -372,6 +372,13 @@ static unsigned int _strlen31(const char
 #define DEFAULT_HOME  "C:"
 #  endif
 
+#undef X509_NAME
+#undef X509_EXTENSIONS
+#undef X509_CERT_PAIR
+#undef PKCS7_ISSUER_AND_SERIAL
+#undef OCSP_REQUEST
+#undef OCSP_RESPONSE
+
 #else /* The non-microsoft world */
 
 #  ifdef OPENSSL_SYS_VMS

__
OpenSSL Project http://www.openssl.org
Development Mailing List   openssl-dev@openssl.org
Automated List Manager   majord...@openssl.org


[openssl.org #2125] [PATCH] Fixup compilation for gcc-aix target

2009-12-09 Thread Alon Bar-Lev via RT

sltest.c:157:1: error: "_XOPEN_SOURCE" redefined
In file included from 
/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.0/include/assert.h:64,
from ssltest.c:146:
/usr/include/standards.h:114:1: error: this is the location of the previous 
definition
make: 1254-004 The error code from the last command is 1.


Stop.
make: 1254-004 The error code from the last command is 1.

diff -urNp openssl-1.0.0-beta4.org/ssl/ssltest.c 
openssl-1.0.0-beta4/ssl/ssltest.c
--- openssl-1.0.0-beta4.org/ssl/ssltest.c   2009-01-08 01:44:27.0 
+0200
+++ openssl-1.0.0-beta4/ssl/ssltest.c   2009-11-21 09:24:46.001175088 +0200
@@ -143,6 +143,9 @@
 #define _BSD_SOURCE 1  /* Or gethostname won't be declared properly
   on Linux and GNU platforms. */
 
+#define _XOPEN_SOURCE 500  /* Or isascii won't be declared properly on
+  VMS (at least with DECompHP C).  */
+
 #include 
 #include 
 #include 
@@ -154,8 +157,6 @@
 #define USE_SOCKETS
 #include "e_os.h"
 
-#define _XOPEN_SOURCE 500  /* Or isascii won't be declared properly on
-  VMS (at least with DECompHP C).  */
 #include 
 
 #include 

__
OpenSSL Project http://www.openssl.org
Development Mailing List   openssl-dev@openssl.org
Automated List Manager   majord...@openssl.org


Re: [openssl.org #1753] snapshot 20081003 broke mingw build

2008-11-28 Thread Alon Bar-Lev via RT
Please merge.

On 11/23/08, Alon Bar-Lev <[EMAIL PROTECTED]> wrote:
>  >  I finish the tests with native build (MSYS environment):
>  >
>  >  The source tree contain recent version (2008-11-23) plus patches:
>  >
>  >  from ticket 1747:
>  >  - openssl-cvs-mingw-capi.patch.gz
>  >  last from this ticket(1753):
>  >  - openssl-000-msys-symlink.patch
>  >  - openssl-001-SNAP-20081003-mingw.patch
>  >
>  >
>  >  The openssl head build fine but there is some warnings not related to 
> mingw
>  > (same reports on linux):
>  >
>  >  - The openssl is configured with prefix to non-existing directory:
>  >  A lot of warnings
>  >  WARNING: can't open config file: /ssl/openssl.cnf
>  >
>  >
>  >  One of the test fail:
>  >  =
>  >  There are definitly a few expired certificates
>  >  ../util/shlib_wrap.sh ../apps/openssl verify -CApath ../certs
>  > ../certs/*.pem
>  >  WARNING: can't open config file: /opt/test/ssl/openssl.cnf
>  >  Error opening certificate file ../certs/*.pem
>  >  =
>  >
>  >
>  >  Roumen
>  >


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


[openssl.org #1777] [SNAPSHOT] Some size_t issues

2008-11-05 Thread Alon Bar-Lev via RT
Attached a fix.

--- openssl-SNAP-20081104/crypto/bn/bn_asm.c	2008-11-02 21:00:07.0 +0200
+++ openssl-SNAP-20081104.new/crypto/bn/bn_asm.c	2008-11-05 21:28:48.0 +0200
@@ -68,7 +68,7 @@
 
 #if defined(BN_LLONG) || defined(BN_UMULT_HIGH)
 
-BN_ULONG bn_mul_add_words(BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w)
+BN_ULONG bn_mul_add_words(BN_ULONG *rp, const BN_ULONG *ap, size_t num, BN_ULONG w)
 	{
 	BN_ULONG c1=0;
 
@@ -94,7 +94,7 @@ BN_ULONG bn_mul_add_words(BN_ULONG *rp, 
 	return(c1);
 	} 
 
-BN_ULONG bn_mul_words(BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w)
+BN_ULONG bn_mul_words(BN_ULONG *rp, const BN_ULONG *ap, size_t num, BN_ULONG w)
 	{
 	BN_ULONG c1=0;
 
@@ -119,7 +119,7 @@ BN_ULONG bn_mul_words(BN_ULONG *rp, cons
 	return(c1);
 	} 
 
-void bn_sqr_words(BN_ULONG *r, const BN_ULONG *a, int n)
+void bn_sqr_words(BN_ULONG *r, const BN_ULONG *a, size_t n)
 {
 	assert(n >= 0);
 	if (n <= 0) return;
--- openssl-SNAP-20081104/crypto/rand/rand_egd.c	2008-11-01 19:00:11.0 +0200
+++ openssl-SNAP-20081104.new/crypto/rand/rand_egd.c	2008-11-05 21:30:46.0 +0200
@@ -96,7 +96,7 @@
  */
 
 #if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_NETWARE) || defined(OPENSSL_SYS_VOS) || defined(OPENSSL_SYS_BEOS)
-int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes)
+int RAND_query_egd_bytes(const char *path, unsigned char *buf, size_t bytes)
 	{
 	return(-1);
 	}
@@ -105,7 +105,7 @@ int RAND_egd(const char *path)
 	return(-1);
 	}
 
-int RAND_egd_bytes(const char *path,int bytes)
+int RAND_egd_bytes(const char *path,size_t bytes)
 	{
 	return(-1);
 	}


Re: [openssl.org #1693] Compiling OpenSSL with mingw-w64

2008-10-31 Thread Alon Bar-Lev via RT
On 10/31/08, Andy Polyakov via RT <[EMAIL PROTECTED]> wrote:
> Could you please test the other suggested bn_lcl.h modification? While
>  you're on it...

I cannot actually test it... I can compile and users may test.
I don't have a win64 machine.
And I don't know how exactly I can check for speed...
I can send you binaries to test if you like.

>  >>> I am not fully sure that the crypto/sha/sha512.c is correct, it
>  >>> simulate the behavior of win64 using Microsoft compiler, using
>  >>> _rotr64 function as ROTR.
>  >> What you should have done instead is to modify macro in question
>  >> declaring ret as unsigned long long. If it doesn't work, then it's more
>  >> appropriate to leave ROTR undefined, i.e. *not* using _rotr64. Please
>  >> verify.
>  >
>  > Thanks, I converted this to SHA_LONG64 and it now compiles.
>
>
> Can you confirm that it even passes the test? I mean mere compilation
>  success doesn't qualify, it has to pass the test.

I will ask my users to run the sha512 test.

>
>  >> Also. As NT is natively UNICODE, and there are no non-NT Win64
>  >> implementations(*), there is no reason to favor legacy ANSI interfaces.
>  >> Could you verify that it compiles and works with -DUNICODE -D_UNICODE
>  >> added to config line?
>  >
>
> > This is too much work,
>
>
> Adding couple of words to config line?

I tried to... But then got many linkage error messages of _OBJ_ something.
Strange... Now I tried it on clean tree with same snapshot and it compiles.
Except one modification I had to do, updated in the patch.

> Quoting util/VC-32.pl: "As per 0.9.8 release remaining warnings were
>  explicitly examined and considered safe to ignore." It naturally does
>  not necessarily apply to HEAD, but there is awareness of the problem.

Well... I don't run this script :)

Attached is a new patch.

Thanks!
Alon.

diff -urNp openssl-SNAP-20081003/Configure openssl-SNAP-20081003.mingw64/Configure
--- openssl-SNAP-20081003/Configure	2008-09-16 00:00:05.0 +0300
+++ openssl-SNAP-20081003.mingw64/Configure	2008-10-20 12:37:37.0 +0200
@@ -496,6 +496,8 @@ my %table=(
 # MinGW
 "mingw", "gcc:-mno-cygwin -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::MINGW32:-lws2_32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} EXPORT_VAR_AS_FN:${x86_coff_asm}:win32:cygwin-shared:-D_WINDLL -DOPENSSL_USE_APPLINK:-mno-cygwin:.dll.a",
 
+"mingw64", "gcc:-mno-cygwin -DL_ENDIAN -DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -Wall -D_WIN32_WINNT=0x333:::MINGW64:-lws2_32 -lgdi32:SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:${no_asm}:win32:cygwin-shared:-D_WINDLL:-mno-cygwin:.dll.a",
+
 # UWIN 
 "UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall:::UWIN::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:win32",
 
@@ -968,7 +970,7 @@ foreach (sort (keys %disabled))
 
 my $IsMK1MF=scalar grep /^$target$/,@MK1MF_Builds;
 
-$exe_ext=".exe" if ($target eq "Cygwin" || $target eq "DJGPP" || $target eq "mingw");
+$exe_ext=".exe" if ($target eq "Cygwin" || $target eq "DJGPP" || $target =~ /^mingw/);
 $exe_ext=".nlm" if ($target =~ /netware/);
 $exe_ext=".pm"  if ($target =~ /vos/);
 $openssldir="/usr/local/ssl" if ($openssldir eq "" and $prefix eq "");
--- openssl-SNAP-20081003/engines/e_aep.c	2008-01-04 01:01:24.0 +0200
+++ openssl-SNAP-20081003.mingw64/engines/e_aep.c	2008-10-20 12:46:24.0 +0200
@@ -62,8 +62,10 @@
 #include 
 #else
 #include 
+#ifndef _PID_T_
 typedef int pid_t;
+#endif
 #endif
 
 #if defined(OPENSSL_SYS_NETWARE) && defined(NETWARE_CLIB)
 #define getpid GetThreadID
diff -urNp openssl-SNAP-20081028.org/crypto/sha/sha512.c openssl-SNAP-20081028/crypto/sha/sha512.c
--- openssl-SNAP-20081028/crypto/sha/sha512.c	2008-04-24 13:00:12.0 +0300
+++ openssl-SNAP-20081028.mingw64/crypto/sha/sha512.c	2008-10-30 22:41:20.0 +0200
@@ -350,7 +350,7 @@ static const SHA_LONG64 K512[80] = {
 #ifndef PEDANTIC
 # if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM)
 #  if defined(__x86_64) || defined(__x86_64__)
-#   define ROTR(a,n)	({ unsigned long ret;		\
+#   define ROTR(a,n)	({ SHA_LONG64 ret;	\
 asm ("rorq %1,%0"	\
 : "=r"(ret)		\
 : "J"(n),"0"(a)		\
--- openssl-SNAP-20081028/apps/speed.c	2008-10-30 22:59:03.0 +0200
+++ openssl-SNAP-20081028.mingw64/apps/speed.c	2008-10-30 22:59:16.0 +0200
@@ -281,7 +281,7 @@ static double Time_F(int s)
 		if (thr==NULL)
 			{
 			DWORD ret=GetLastError();
-			BIO_printf(bio_err,"unable to CreateThread (%d)",ret);
+			BIO_printf(bio_err,"unable to CreateThread (%ld)",ret);
 			ExitProcess(ret);
 			}
 		CloseHandle(thr);		/* detach the thread	*/
--- openssl-SNAP-20081028/crypto/bio/bss_log.c	2008-10-31 14:32:17.0 +0200
+++ openssl-SNAP-20081028.mingw64/crypto/bio/bss_log.c	2008-10-31 14:24:51.0 +0200
@@ -71,6 +71,7 @@
 #if defined(OPENSSL_SYS_WINCE)
 #elif defined(OPENSSL_SYS_WIN32)
 #  include 
+#  include 
 #elif defined(OPENSSL_SYS_VMS)
 #  incl

Re: [openssl.org #1771] CVS Head crypto/jpake/Makefile - missing install rule?

2008-10-31 Thread Alon Bar-Lev via RT
Forgot the attachment to rt.
Sorry for the noise.

On 10/31/08, Alon Bar-Lev via RT <[EMAIL PROTECTED]> wrote:
> On 10/31/08, Alon Bar-Lev <[EMAIL PROTECTED]> wrote:
>  > Also string.h is missing.
>
> >
>  >
>  >  On 10/31/08, Alon Bar-Lev via RT <[EMAIL PROTECTED]> wrote:
>  >  > making install in crypto/jpake...
>  >  >  make[2]: Entering directory
>  >  >  
> `/home/alonbl/tmp/Development/opensc/build/trunk/tmp/openssl-SNAP-20081028/crypto/jpake'
>  >  >
>  >  >  __
>  >  >  OpenSSL Project http://www.openssl.org
>  >  >  Development Mailing List   openssl-dev@openssl.org
>  >  >  Automated List Manager   [EMAIL PROTECTED]
>  >  >
>  >
>  >
>
>
>  __
>  OpenSSL Project http://www.openssl.org
>  Development Mailing List   openssl-dev@openssl.org
>  Automated List Manager   [EMAIL PROTECTED]
>

--- openssl-SNAP-20081028/crypto/jpake/jpake.c	2008-10-27 15:00:14.0 +0200
+++ openssl-SNAP-20081028.mingw64/crypto/jpake/jpake.c	2008-10-30 23:23:30.0 +0200
@@ -5,6 +5,7 @@
 #include 
 #include 
 #include 
+#include 
 
 /*
  * In the definition, (xa, xb, xc, xd) are Alice's (x1, x2, x3, x4) or


Re: [openssl.org #1771] CVS Head crypto/jpake/Makefile - missing install rule?

2008-10-31 Thread Alon Bar-Lev via RT
On 10/31/08, Alon Bar-Lev <[EMAIL PROTECTED]> wrote:
> Also string.h is missing.
>
>
>  On 10/31/08, Alon Bar-Lev via RT <[EMAIL PROTECTED]> wrote:
>  > making install in crypto/jpake...
>  >  make[2]: Entering directory
>  >  
> `/home/alonbl/tmp/Development/opensc/build/trunk/tmp/openssl-SNAP-20081028/crypto/jpake'
>  >
>  >  __
>  >  OpenSSL Project http://www.openssl.org
>  >  Development Mailing List   openssl-dev@openssl.org
>  >  Automated List Manager   [EMAIL PROTECTED]
>  >
>
>


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


[openssl.org #1771] CVS Head crypto/jpake/Makefile - missing install rule?

2008-10-31 Thread Alon Bar-Lev via RT
making install in crypto/jpake...
make[2]: Entering directory
`/home/alonbl/tmp/Development/opensc/build/trunk/tmp/openssl-SNAP-20081028/crypto/jpake'

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


Re: [openssl.org #1693] Compiling OpenSSL with mingw-w64

2008-10-30 Thread Alon Bar-Lev via RT
On Thursday 30 October 2008, Andy Polyakov via RT wrote:
> > There is no assembly support for pe64.
> 
> Well, Win64 ABI is fully supported by OpenSSL x86_64 assembler modules. 
> There is no support for GNU assembler under Win64, but masm (rather 
> known as ml64) and nasm are fully supported (though there are 
> requirements for least supported versions, for nasm it's 2.03).

This would be great!

> > I am not fully sure that the crypto/sha/sha512.c is correct, it
> > simulate the behavior of win64 using Microsoft compiler, using
> > _rotr64 function as ROTR.
> 
> What you should have done instead is to modify macro in question 
> declaring ret as unsigned long long. If it doesn't work, then it's more 
> appropriate to leave ROTR undefined, i.e. *not* using _rotr64. Please 
> verify.

Thanks, I converted this to SHA_LONG64 and it now compiles.

> Also. As NT is natively UNICODE, and there are no non-NT Win64 
> implementations(*), there is no reason to favor legacy ANSI interfaces. 
> Could you verify that it compiles and works with -DUNICODE -D_UNICODE 
> added to config line? A.

This is too much work, and it is not related to mingw-win64, as this is needed
also for NT port. There is too much dependency in ANSI in current 
implementation.

I forgot to mention that the uplink was removed due to assembly issues.

There is another issue... sizeof(long)http://www.opensc-project.org/build/browser/trunk/mingw64
[2] http://www.opensc-project.org/build/browser/trunk

diff -urNp openssl-SNAP-20081003/Configure openssl-SNAP-20081003.mingw64/Configure
--- openssl-SNAP-20081003/Configure	2008-09-16 00:00:05.0 +0300
+++ openssl-SNAP-20081003.mingw64/Configure	2008-10-20 12:37:37.0 +0200
@@ -496,6 +496,8 @@ my %table=(
 # MinGW
 "mingw", "gcc:-mno-cygwin -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::MINGW32:-lws2_32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} EXPORT_VAR_AS_FN:${x86_coff_asm}:win32:cygwin-shared:-D_WINDLL -DOPENSSL_USE_APPLINK:-mno-cygwin:.dll.a",
 
+"mingw64", "gcc:-mno-cygwin -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -Wall -D_WIN32_WINNT=0x333:::MINGW64:-lws2_32 -lgdi32:SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:${no_asm}:win32:cygwin-shared:-D_WINDLL:-mno-cygwin:.dll.a",
+
 # UWIN 
 "UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall:::UWIN::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:win32",
 
@@ -968,7 +970,7 @@ foreach (sort (keys %disabled))
 
 my $IsMK1MF=scalar grep /^$target$/,@MK1MF_Builds;
 
-$exe_ext=".exe" if ($target eq "Cygwin" || $target eq "DJGPP" || $target eq "mingw");
+$exe_ext=".exe" if ($target eq "Cygwin" || $target eq "DJGPP" || $target =~ /^mingw/);
 $exe_ext=".nlm" if ($target =~ /netware/);
 $exe_ext=".pm"  if ($target =~ /vos/);
 $openssldir="/usr/local/ssl" if ($openssldir eq "" and $prefix eq "");
--- openssl-SNAP-20081003/engines/e_aep.c	2008-01-04 01:01:24.0 +0200
+++ openssl-SNAP-20081003.mingw64/engines/e_aep.c	2008-10-20 12:46:24.0 +0200
@@ -62,8 +62,10 @@
 #include 
 #else
 #include 
+#ifndef _PID_T_
 typedef int pid_t;
+#endif
 #endif
 
 #if defined(OPENSSL_SYS_NETWARE) && defined(NETWARE_CLIB)
 #define getpid GetThreadID
diff -urNp openssl-SNAP-20081028.org/crypto/sha/sha512.c openssl-SNAP-20081028/crypto/sha/sha512.c
--- openssl-SNAP-20081028/crypto/sha/sha512.c	2008-04-24 13:00:12.0 +0300
+++ openssl-SNAP-20081028.mingw64/crypto/sha/sha512.c	2008-10-30 22:41:20.0 +0200
@@ -350,7 +350,7 @@ static const SHA_LONG64 K512[80] = {
 #ifndef PEDANTIC
 # if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM)
 #  if defined(__x86_64) || defined(__x86_64__)
-#   define ROTR(a,n)	({ unsigned long ret;		\
+#   define ROTR(a,n)	({ SHA_LONG64 ret;	\
 asm ("rorq %1,%0"	\
 : "=r"(ret)		\
 : "J"(n),"0"(a)		\
--- openssl-SNAP-20081028/apps/speed.c	2008-10-30 22:59:03.0 +0200
+++ openssl-SNAP-20081028.mingw64/apps/speed.c	2008-10-30 22:59:16.0 +0200
@@ -281,7 +281,7 @@ static double Time_F(int s)
 		if (thr==NULL)
 			{
 			DWORD ret=GetLastError();
-			BIO_printf(bio_err,"unable to CreateThread (%d)",ret);
+			BIO_printf(bio_err,"unable to CreateThread (%ld)",ret);
 			ExitProcess(ret);
 			}
 		CloseHandle(thr);		/* detach the thread	*/
--- openssl-SNAP-20081028/crypto/jpake/jpake.c	2008-10-27 15:00:14.0 +0200
+++ openssl-SNAP-20081028.mingw64/crypto/jpake/jpake.c	2008-10-30 23:23:30.0 +0200
@@ -5,6 +5,7 @@
 #include 
 #include 
 #include 
+#include 
 
 /*
  * In the definition, (xa, xb, xc, xd) are Alice's (x1, x2, x3, x4) or


Re: [openssl.org #1693] Compiling OpenSSL with mingw-w64

2008-10-30 Thread Alon Bar-Lev via RT

Hello,

Attached is latest mingw win64 patch for OpenSSL.

It is verified to work with the OpenSC project and the OpenVPN project using 
cross compile from Linux machine using binutils CVS head, gcc-4.3.2 and 
mingw-w64 svn head.

There is no assembly support for pe64. So no assembly is available. Can someone 
estimate if it is better to use 32bit with assembly than 64bit without?

I am not fully sure that the crypto/sha/sha512.c is correct, it simulate the 
behavior of win64 using Microsoft compiler, using _rotr64 function as ROTR.

If correct, please consider to merge this so there is some solution for win64 
users and not require to keep syncing with CVS head.

I use:
./Configure --prefix="//" --cross-compile-prefix=x86_64-pc-mingw32- no-zlib 
shared mingw64 no-capieng

Thank you,
Alon Bar-Lev.

diff -urNp openssl-SNAP-20081003/Configure openssl-SNAP-20081003.mingw64/Configure
--- openssl-SNAP-20081003/Configure	2008-09-16 00:00:05.0 +0300
+++ openssl-SNAP-20081003.mingw64/Configure	2008-10-20 12:37:37.0 +0200
@@ -496,6 +496,8 @@ my %table=(
 # MinGW
 "mingw", "gcc:-mno-cygwin -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::MINGW32:-lws2_32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} EXPORT_VAR_AS_FN:${x86_coff_asm}:win32:cygwin-shared:-D_WINDLL -DOPENSSL_USE_APPLINK:-mno-cygwin:.dll.a",
 
+"mingw64", "gcc:-mno-cygwin -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -Wall -D_WIN32_WINNT=0x333:::MINGW64:-lws2_32 -lgdi32:SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:${no_asm}:win32:cygwin-shared:-D_WINDLL:-mno-cygwin:.dll.a",
+
 # UWIN 
 "UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall:::UWIN::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:win32",
 
@@ -968,7 +970,7 @@ foreach (sort (keys %disabled))
 
 my $IsMK1MF=scalar grep /^$target$/,@MK1MF_Builds;
 
-$exe_ext=".exe" if ($target eq "Cygwin" || $target eq "DJGPP" || $target eq "mingw");
+$exe_ext=".exe" if ($target eq "Cygwin" || $target eq "DJGPP" || $target =~ /^mingw/);
 $exe_ext=".nlm" if ($target =~ /netware/);
 $exe_ext=".pm"  if ($target =~ /vos/);
 $openssldir="/usr/local/ssl" if ($openssldir eq "" and $prefix eq "");
--- openssl-SNAP-20081003/engines/e_aep.c	2008-01-04 01:01:24.0 +0200
+++ openssl-SNAP-20081003.mingw64/engines/e_aep.c	2008-10-20 12:46:24.0 +0200
@@ -62,8 +62,10 @@
 #include 
 #else
 #include 
+#ifndef _PID_T_
 typedef int pid_t;
+#endif
 #endif
 
 #if defined(OPENSSL_SYS_NETWARE) && defined(NETWARE_CLIB)
 #define getpid GetThreadID
--- openssl-SNAP-20081023/crypto/sha/sha512.c	2008-04-24 13:00:12.0 +0300
+++ openssl-SNAP-20081023.mingw64/crypto/sha/sha512.c	2008-10-28 00:19:56.0 +0200
@@ -350,11 +350,15 @@ static const SHA_LONG64 K512[80] = {
 #ifndef PEDANTIC
 # if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM)
 #  if defined(__x86_64) || defined(__x86_64__)
-#   define ROTR(a,n)	({ unsigned long ret;		\
+#   if defined(_WIN64)
+#define ROTR(a,n)	_rotr64((a),n)	/* applies to both IA-64 and AMD64 */
+#   else
+#define ROTR(a,n)	({ unsigned long ret;		\
 asm ("rorq %1,%0"	\
 : "=r"(ret)		\
 : "J"(n),"0"(a)		\
 : "cc"); ret;		})
+#   endif
 #   if !defined(B_ENDIAN)
 #define PULL64(x) ({ SHA_LONG64 ret=*((const SHA_LONG64 *)(&(x)));	\
 asm ("bswapq	%0"		\


Re: [openssl.org #1753] snapshot 20081003 broke mingw build

2008-10-22 Thread Alon Bar-Lev via RT
I did not wish to do anything special except of fixing mingw, so I
drop the LEAN_AND_MEAN fixup.
Latest snapshot added obj_xref.h, so the depend target can stay the same.

Attached is the only fix needed for making domd use cross compiler, as
it fails because of the -mno-cygwin.
And optional fix I have in my queue for msys.

Thanks!


For some strange reason perl reports that symlinks are available
under msys, while it cannot create symbolic link when the to
is not reachable from cwd.

---

diff -urNp openssl-SNAP-20080611.org/util/mklink.pl openssl-SNAP-20080611/util/mklink.pl
--- openssl-SNAP-20080611.org/util/mklink.pl	2006-02-09 15:00:35.0 +0200
+++ openssl-SNAP-20080611/util/mklink.pl	2008-06-13 12:42:06.0 +0300
@@ -51,6 +51,7 @@ my $to = join('/', @to_path);
 
 my $file;
 $symlink_exists=eval {symlink("",""); 1};
+if ($^O eq "msys") { $symlink_exists=0 };
 foreach $file (@files) {
 my $err = "";
 if ($symlink_exists) {

Make domd use cross compiler if available.

---

--- openssl-SNAP-20081019/Configure	2008-10-12 17:00:05.0 +0200
+++ openssl-SNAP-20081019.old/Configure	2008-10-21 20:13:28.0 +0200
@@ -1394,12 +1394,13 @@ while ()
 		s/^AR=\s*/AR= \$\(CROSS_COMPILE_PREFIX\)/;
 		s/^NM=\s*/NM= \$\(CROSS_COMPILE_PREFIX\)/;
 		s/^RANLIB=\s*/RANLIB= \$\(CROSS_COMPILE_PREFIX\)/;
+		s/^MAKEDEPPROG=.*$/MAKEDEPPROG= \$\(CROSS_COMPILE_PREFIX\)$cc/ if $cc eq "gcc";
 		}
 	else	{
 		s/^CC=.*$/CC= $cc/;
 		s/^RANLIB=.*/RANLIB= $ranlib/;
+		s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc";
 		}
-	s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc";
 	s/^CFLAG=.*$/CFLAG= $cflags/;
 	s/^DEPFLAG=.*$/DEPFLAG= $depflags/;
 	s/^PEX_LIBS=.*$/PEX_LIBS= $prelflags/;
--- openssl-SNAP-20081019/util/domd	2008-09-09 23:00:21.0 +0300
+++ openssl-SNAP-20081019.old/util/domd	2008-10-21 20:16:57.0 +0200
@@ -14,7 +14,7 @@ if [ "$MAKEDEPEND" = "" ]; then MAKEDEPE
 cp Makefile Makefile.save
 # fake the presence of Kerberos
 touch $TOP/krb5.h
-if [ "$MAKEDEPEND" = "gcc" ]; then
+if echo "$MAKEDEPEND" | grep "gcc" > /dev/null;  then
 args=""
 while [ $# -gt 0 ]; do
 	if [ "$1" != "--" ]; then args="$args $1"; fi
@@ -22,7 +22,7 @@ if [ "$MAKEDEPEND" = "gcc" ]; then
 done
 sed -e '/^# DO NOT DELETE.*/,$d' < Makefile > Makefile.tmp
 echo '# DO NOT DELETE THIS LINE -- make depend depends on it.' >> Makefile.tmp
-gcc -Werror -D OPENSSL_DOING_MAKEDEPEND -M $args >> Makefile.tmp || exit
+"$MAKEDEPEND" -Werror -D OPENSSL_DOING_MAKEDEPEND -M $args >> Makefile.tmp || exit
 ${PERL} $TOP/util/clean-depend.pl < Makefile.tmp > Makefile.new
 rm -f Makefile.tmp
 else


Re: [openssl.org #1753] snapshot 20081003 broke mingw build

2008-10-22 Thread Alon Bar-Lev via RT
Hello Roumen,

Thank you for addressing this.
I cannot reproduce the _XOPEN_SOURCE issue anymore, maybe because in
the meantime I upgraded to mingw-runtime-3.15.1.

For the WIN32_LEAN_AND_MEAN, I don't see how it is relates to winsock
issue... You could always have #include  and you do this
already at e_os.h. It cleaner as it does not include extra headers and
removes the conflicts from x509.h... But it is optional.

Waiting for 2, 3, 4... :)

Thanks,
Alon.

On 10/21/08, Roumen Petrov via RT <[EMAIL PROTECTED]> wrote:
> Alon Bar-Lev via RT wrote:
>  > Attached are patches, please address this issues, it is hard to keep sync 
> this way.
>  > The order of the issue is according to importance, (1, 2, 3) blockers.
>  > Thanks!
>  >
>  > 1. _XOPEN_SOURCE cannot be used in mingw, strptime is never used anyway?
>  >
>  > 2. Make domd use cross compiler if available.
>  >
>  > 3. Update depend to execute update so that 
> openssl/crypto/objects/obj_xref.h
>  > will be generated as it is required for "make depend".
>  >
>  > 4. For some strange reason perl reports that symlinks are available
>  > under msys, while it cannot create symbolic link when the to
>  > is not reachable from cwd.
>  >
>  > 5. Added -DWIN32_LEAN_AND_MEAN and drop the conflict undef of x509.h
>  >
>  >
>
>
> I couldn't confirm above but I build in cross-compilation environment.
>  About 5) -DWIN32_LEAN_AND_MEAN it has to be default for all windows
>  build except mingw32. It is related to winsock2 but mingw32 always
>  include winsock2 headers. No objections this to be default for mingw
>  too. May by you use mingw64  and this project use different headers in
>  comparison to mingw32  project. The issue with mingw64 was already reported.
>
>  About 1) _XOPEN_SOURCE it is not clear what is really problem. I would
>  like to reject this for minw32 It definition for mingw32 project is same
>  as -posix compiler flag. Please detail version of mingw runtime environment.
>
>  About 2,3,4 - later.
>
>  Roumen
>
>
>


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


Re: [openssl.org #1753] snapshot 20081003 broke mingw build

2008-10-21 Thread Alon Bar-Lev via RT

Attached are patches, please address this issues, it is hard to keep sync this 
way.
The order of the issue is according to importance, (1, 2, 3) blockers.
Thanks!

1. _XOPEN_SOURCE cannot be used in mingw, strptime is never used anyway?

2. Make domd use cross compiler if available.

3. Update depend to execute update so that openssl/crypto/objects/obj_xref.h
will be generated as it is required for "make depend".

4. For some strange reason perl reports that symlinks are available
under msys, while it cannot create symbolic link when the to
is not reachable from cwd.

5. Added -DWIN32_LEAN_AND_MEAN and drop the conflict undef of x509.h


_XOPEN_SOURCE cannot be used in mingw, strptime is never used anyway?

Added -DWIN32_LEAN_AND_MEAN and drop the conflict undef of x509.h

Make domd use cross compiler if available.

Update depend to execute update so that openssl/crypto/objects/obj_xref.h
will be generated as it is required for "make depend".

---

diff -urNp openssl-SNAP-20081003.org/ssl/kssl.c openssl-SNAP-20081003/ssl/kssl.c
--- openssl-SNAP-20081003.org/ssl/kssl.c	2007-02-10 13:00:54.0 +0200
+++ openssl-SNAP-20081003/ssl/kssl.c	2008-10-04 21:30:51.0 +0300
@@ -68,7 +68,6 @@
 
 #include 
 
-#define _XOPEN_SOURCE 500 /* glibc2 needs this to declare strptime() */
 #include 
 #if 0 /* Experimental */
 #undef _XOPEN_SOURCE /* To avoid clashes with anything else... */
--- openssl-SNAP-20081019/Configure	2008-10-12 17:00:05.0 +0200
+++ openssl-SNAP-20081019.old/Configure	2008-10-21 20:13:28.0 +0200
@@ -495,7 +495,7 @@ my %table=(
 "BC-32","bcc32WIN32::BN_LLONG DES_PTR RC4_INDEX EXPORT_VAR_AS_FN:${no_asm}:win32",
 
 # MinGW
-"mingw", "gcc:-mno-cygwin -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::MINGW32:-lws2_32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} EXPORT_VAR_AS_FN:${x86_coff_asm}:win32:cygwin-shared:-D_WINDLL -DOPENSSL_USE_APPLINK:-mno-cygwin:.dll.a",
+"mingw", "gcc:-mno-cygwin -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::MINGW32:-lws2_32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} EXPORT_VAR_AS_FN:${x86_coff_asm}:win32:cygwin-shared:-D_WINDLL -DOPENSSL_USE_APPLINK:-mno-cygwin:.dll.a",
 
 # UWIN 
 "UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall:::UWIN::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:win32",
@@ -1394,12 +1394,13 @@ while ()
 		s/^AR=\s*/AR= \$\(CROSS_COMPILE_PREFIX\)/;
 		s/^NM=\s*/NM= \$\(CROSS_COMPILE_PREFIX\)/;
 		s/^RANLIB=\s*/RANLIB= \$\(CROSS_COMPILE_PREFIX\)/;
+		s/^MAKEDEPPROG=.*$/MAKEDEPPROG= \$\(CROSS_COMPILE_PREFIX\)$cc/ if $cc eq "gcc";
 		}
 	else	{
 		s/^CC=.*$/CC= $cc/;
 		s/^RANLIB=.*/RANLIB= $ranlib/;
+		s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc";
 		}
-	s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc";
 	s/^CFLAG=.*$/CFLAG= $cflags/;
 	s/^DEPFLAG=.*$/DEPFLAG= $depflags/;
 	s/^PEX_LIBS=.*$/PEX_LIBS= $prelflags/;
--- openssl-SNAP-20081019/util/domd	2008-09-09 23:00:21.0 +0300
+++ openssl-SNAP-20081019.old/util/domd	2008-10-21 20:16:57.0 +0200
@@ -14,7 +14,7 @@ if [ "$MAKEDEPEND" = "" ]; then MAKEDEPE
 cp Makefile Makefile.save
 # fake the presence of Kerberos
 touch $TOP/krb5.h
-if [ "$MAKEDEPEND" = "gcc" ]; then
+if echo "$MAKEDEPEND" | grep "gcc" > /dev/null;  then
 args=""
 while [ $# -gt 0 ]; do
 	if [ "$1" != "--" ]; then args="$args $1"; fi
@@ -22,7 +22,7 @@ if [ "$MAKEDEPEND" = "gcc" ]; then
 done
 sed -e '/^# DO NOT DELETE.*/,$d' < Makefile > Makefile.tmp
 echo '# DO NOT DELETE THIS LINE -- make depend depends on it.' >> Makefile.tmp
-gcc -Werror -D OPENSSL_DOING_MAKEDEPEND -M $args >> Makefile.tmp || exit
+"$MAKEDEPEND" -Werror -D OPENSSL_DOING_MAKEDEPEND -M $args >> Makefile.tmp || exit
 ${PERL} $TOP/util/clean-depend.pl < Makefile.tmp > Makefile.new
 rm -f Makefile.tmp
 else
--- openssl-SNAP-20081019.old/Makefile.org	2008-06-04 15:00:10.0 +0300
+++ openssl-SNAP-20081019/Makefile.org	2008-10-21 20:30:17.0 +0200
@@ -409,7 +409,7 @@ tests: rehash
 report:
 	@$(PERL) util/selftest.pl
 
-depend:
+depend:	update
 	@set -e; target=depend; $(RECURSIVE_BUILD_CMD)
 
 lint:
--- openssl-SNAP-20081019/crypto/x509/x509.h	2008-10-08 01:00:18.0 +0200
+++ openssl-SNAP-20081019.new/crypto/x509/x509.h	2008-10-21 20:42:20.0 +0200
@@ -112,12 +112,6 @@
 extern "C" {
 #endif
 
-#ifdef OPENSSL_SYS_WIN32
-/* Under Win32 these are defined in wincrypt.h */
-#undef X509_NAME
-#undef X509_CERT_PAIR
-#endif
-
 #define X509_FILETYPE_PEM	1
 #define X509_FILETYPE_ASN1	2
 #define X509_FILETYPE_DEFAULT	3

For some strange reason perl reports that symlinks are available
under msys, while it cannot create symbolic link when the to
is not reachable from cwd.

---

diff -urNp openssl-SNAP-20080611.org/util/mklink.pl openssl-SNAP-20080611/util/mklink.pl
--- openssl-SNAP-20080611.org/util/mklink.pl	2006-02-09 15:00:35.0 +0200
+++ openssl-SNAP-20080611/util/mklink.pl	2008-06-13 12:42:06.0 +0300
@@ -51,6 +51

Re: [openssl.org #1693] Compiling OpenSSL with mingw-w64

2008-10-20 Thread Alon Bar-Lev via RT

The alarm() will be removed:

https://sourceforge.net/tracker/index.php?func=detail&aid=2182468&group_id=202880&atid=983354


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


Re: [openssl.org #1693] Compiling OpenSSL with mingw-w64

2008-10-20 Thread Alon Bar-Lev via RT

Hello,

Attached is a new version, against latest snapshot.

I don't know how the -DOPENSSL_USE_APPLINK works for you guys... It produces 
invalid asm for me...
I don't fully understand what this file do...

perl ../ms/uplink.pl coff > uplink-cof.s
x86_64-pc-mingw32-gcc -I. -I.. -I../include -D_WINDLL -DOPENSSL_USE_APPLINK 
-DOPENSSL_PIC -DOPENSSL_THREADS  -DDSO_WIN32 -mno-cygwin -DL_ENDIAN 
-DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -Wall -D_WIN32_WINNT=0x333 -c  
-o uplink-cof.o uplink-cof.s
uplink-cof.s: Assembler messages:
uplink-cof.s:5: Error: suffix or operands invalid for `push'
uplink-cof.s:6: Error: suffix or operands invalid for `push'
uplink-cof.s:13: Error: suffix or operands invalid for `push'


WIN32_LEAN_AND_MEAN should also be added to regular mingw target.

---

diff -urNp openssl-SNAP-20081003/apps/speed.c 
openssl-SNAP-20081003.mingw64/apps/speed.c
--- openssl-SNAP-20081003/apps/speed.c  2007-11-16 17:00:11.0 +0200
+++ openssl-SNAP-20081003.mingw64/apps/speed.c  2008-10-20 12:58:43.0 
+0200
@@ -261,7 +261,8 @@ static SIGRETTYPE sig_done(int sig)
 
 #define SIGALRM
 static unsigned int lapse,schlock;
-static void alarm(unsigned int secs) { lapse = secs*1000; }
+static void myalarm(unsigned int secs) { lapse = secs*1000; }
+#define ALARM myalarm
 
 static DWORD WINAPI sleepy(VOID *arg)
{
@@ -291,6 +291,7 @@ static double Time_F(int s)
return app_tminterval(s,usertime);
}
 #else
+#define ALARM alarm
 
 static double Time_F(int s)
{
@@ -2514,7 +2515,7 @@ static void print_message(const char *s,
BIO_printf(bio_err,mr ? "+DT:%s:%d:%d\n"
   : "Doing %s for %ds on %d size blocks: ",s,SECONDS,length);
(void)BIO_flush(bio_err);
-   alarm(SECONDS);
+   ALARM(SECONDS);
 #else
BIO_printf(bio_err,mr ? "+DN:%s:%ld:%d\n"
   : "Doing %s %ld times on %d size blocks: ",s,num,length);
@@ -2532,7 +2533,7 @@ static void pkey_print_message(const cha
BIO_printf(bio_err,mr ? "+DTP:%d:%s:%s:%d\n"
   : "Doing %d bit %s %s's for %ds: ",bits,str,str2,tm);
(void)BIO_flush(bio_err);
-   alarm(RSA_SECONDS);
+   ALARM(RSA_SECONDS);
 #else
BIO_printf(bio_err,mr ? "+DNP:%ld:%d:%s:%s\n"
   : "Doing %ld %d bit %s %s's: ",num,bits,str,str2);
diff -urNp openssl-SNAP-20081003/Configure 
openssl-SNAP-20081003.mingw64/Configure
--- openssl-SNAP-20081003/Configure 2008-09-16 00:00:05.0 +0300
+++ openssl-SNAP-20081003.mingw64/Configure 2008-10-20 12:37:37.0 
+0200
@@ -496,6 +496,8 @@ my %table=(
 # MinGW
 "mingw", "gcc:-mno-cygwin -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 
-Wall:::MINGW32:-lws2_32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} 
EXPORT_VAR_AS_FN:${x86_coff_asm}:win32:cygwin-shared:-D_WINDLL 
-DOPENSSL_USE_APPLINK:-mno-cygwin:.dll.a",
 
+"mingw64", "gcc:-mno-cygwin -DL_ENDIAN -DWIN32_LEAN_AND_MEAN 
-fomit-frame-pointer -O3 -Wall -D_WIN32_WINNT=0x333:::MINGW64:-lws2_32 
-lgdi32:SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT 
EXPORT_VAR_AS_FN:${no_asm}:win32:cygwin-shared:-D_WINDLL:-mno-cygwin 
-shared:.dll.a",
+
 # UWIN 
 "UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall:::UWIN::BN_LLONG ${x86_gcc_des} 
${x86_gcc_opts}:${no_asm}:win32",
 
@@ -968,7 +970,7 @@ foreach (sort (keys %disabled))
 
 my $IsMK1MF=scalar grep /^$target$/,@MK1MF_Builds;
 
-$exe_ext=".exe" if ($target eq "Cygwin" || $target eq "DJGPP" || $target eq 
"mingw");
+$exe_ext=".exe" if ($target eq "Cygwin" || $target eq "DJGPP" || $target =~ 
/^mingw*/);
 $exe_ext=".nlm" if ($target =~ /netware/);
 $exe_ext=".pm"  if ($target =~ /vos/);
 $openssldir="/usr/local/ssl" if ($openssldir eq "" and $prefix eq "");
--- openssl-SNAP-20081003/engines/e_aep.c   2008-01-04 01:01:24.0 
+0200
+++ openssl-SNAP-20081003.mingw64/engines/e_aep.c   2008-10-20 
12:46:24.0 +0200
@@ -62,8 +62,10 @@
 #include 
 #else
 #include 
+#ifndef _PID_T_
 typedef int pid_t;
+#endif
 #endif
 
 #if defined(OPENSSL_SYS_NETWARE) && defined(NETWARE_CLIB)
 #define getpid GetThreadID


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


[openssl.org #1753] snapshot 20081003 broke mingw build

2008-10-06 Thread Alon Bar-Lev via RT

Hello,

Latest snapshot broke mingw build for the following reasons:

1. ssl/kssl.c declares _XOPEN_SOURCE at source level and not at configuration 
level, this is invalid in some environments. Please consider moving this to 
Configure targets table. Also, I cannot see where strptime is used anyway... :)

2.util/domd was modified to exit on error, this is OK, but exposed a different 
error that was there since cross compile feature was added to build system. The 
domd uses gcc directly and ignores the cross compile prefix. Please make it use 
correct toolchain.

While we at it, one old minor issue with msys... For some strange reason perl 
reports that symlinks are available under msys, while it cannot create symbolic 
link when the to is not reachable from cwd. Attached is also a fix for this one.

Thanks,
Alon Bar-Lev.

---

diff -urNp openssl-SNAP-20081003.org/ssl/kssl.c openssl-SNAP-20081003/ssl/kssl.c
--- openssl-SNAP-20081003.org/ssl/kssl.c2007-02-10 13:00:54.0 
+0200
+++ openssl-SNAP-20081003/ssl/kssl.c2008-10-04 21:30:51.0 +0300
@@ -68,7 +68,6 @@
 
 #include 
 
-#define _XOPEN_SOURCE 500 /* glibc2 needs this to declare strptime() */
 #include 
 #if 0 /* Experimental */
 #undef _XOPEN_SOURCE /* To avoid clashes with anything else... */
diff -urNp openssl-SNAP-20081003.org/util/domd openssl-SNAP-20081003/util/domd
--- openssl-SNAP-20081003.org/util/domd 2008-09-09 23:00:21.0 +0300
+++ openssl-SNAP-20081003/util/domd 2008-10-04 21:29:05.0 +0300
@@ -22,7 +22,7 @@ if [ "$MAKEDEPEND" = "gcc" ]; then
 done
 sed -e '/^# DO NOT DELETE.*/,$d' < Makefile > Makefile.tmp
 echo '# DO NOT DELETE THIS LINE -- make depend depends on it.' >> 
Makefile.tmp
-gcc -Werror -D OPENSSL_DOING_MAKEDEPEND -M $args >> Makefile.tmp || exit
+gcc -D OPENSSL_DOING_MAKEDEPEND -M $args >> Makefile.tmp
 ${PERL} $TOP/util/clean-depend.pl < Makefile.tmp > Makefile.new
 rm -f Makefile.tmp
 else
diff -urNp openssl-SNAP-20080611.org/util/mklink.pl 
openssl-SNAP-20080611/util/mklink.pl
--- openssl-SNAP-20080611.org/util/mklink.pl2006-02-09 15:00:35.0 
+0200
+++ openssl-SNAP-20080611/util/mklink.pl2008-06-13 12:42:06.0 
+0300
@@ -51,6 +51,7 @@ my $to = join('/', @to_path);
 
 my $file;
 $symlink_exists=eval {symlink("",""); 1};
+if ($^O eq "msys") { $symlink_exists=0 };
 foreach $file (@files) {
 my $err = "";
 if ($symlink_exists) {

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


Re: [openssl.org #1451] PATCH (Re: Cross compile OpenSSL in Linux using MinGW32)

2008-02-17 Thread Alon Bar-Lev via RT
Can be closed in favor of:
http://rt.openssl.org/index.html?q=1552


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


Re: [openssl.org #1552] mingw patch for openssl-cvs

2008-02-17 Thread Alon Bar-Lev via RT
Great!
Works also with cross compile, closes #1415!
A minor fix is attached. The prefix must be enclosed with brackets as
when $$x$(y), the y is translated first.

Just for my reminder:
./Configure --prefix=// --cross-compile-prefix=mingw32- shared mingw
make install INSTALL_PREFIX=/tmp/w32

Alon.

On 2/17/08, Roumen Petrov via RT <[EMAIL PROTECTED]> wrote:
> patch updated to current cvs 20080217
>
> Roumen
>
>
>
>

diff -urNp openssl-SNAP-20080217.r/engines/ccgost/Makefile openssl-SNAP-20080217.rn/engines/ccgost/Makefile
--- openssl-SNAP-20080217.r/engines/ccgost/Makefile	2008-02-17 19:28:50.0 +0200
+++ openssl-SNAP-20080217.rn/engines/ccgost/Makefile	2008-02-17 19:29:29.0 +0200
@@ -53,13 +53,13 @@ install: 	
 			*DSO_WIN32*)	sfx="eay32.dll"; pfx=;;	\
 			*) sfx=".bad";; \
 			esac; \
-			cp $$pfx$(LIBNAME)$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$$pfx$(LIBNAME)$$sfx.new; \
+			cp $${pfx}$(LIBNAME)$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$${pfx}$(LIBNAME)$$sfx.new; \
 		else \
 			sfx="so"; \
-			cp cyg$(LIBNAME).dll $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$$pfx$(LIBNAME)$$sfx.new; \
+			cp cyg$(LIBNAME).dll $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$${pfx}$(LIBNAME)$$sfx.new; \
 		fi; \
-		chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$$pfx$(LIBNAME)$$sfx.new; \
-		mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$$pfx$(LIBNAME)$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$$pfx$(LIBNAME)$$sfx; \
+		chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$${pfx}$(LIBNAME)$$sfx.new; \
+		mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$${pfx}$(LIBNAME)$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$${pfx}$(LIBNAME)$$sfx; \
 	fi
 
 links:


Re: [openssl.org #1451] PATCH (Re: Cross compile OpenSSL in Linux using MinGW32)

2007-10-27 Thread Alon Bar-Lev via RT
On 10/27/07, Andy Polyakov via RT <[EMAIL PROTECTED]> wrote:
> > Any reason why not merge the patch into snapshots?
>
> The only reason is lack of time. Trouble is that there also are other
> minor open issues in mingw build and idea is to sit down some day and
> reflect over the whole build procedure. A.

Great to get response!
Maybe I can help?


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


Re: [openssl.org #1451] PATCH (Re: Cross compile OpenSSL in Linux using MinGW32)

2007-10-22 Thread Alon Bar-Lev via RT
Hello OpenSSL developers,

Any reason why not merge the patch into snapshots?

http://rt.openssl.org/Ticket/Display.html?id=1451

It is important for people who wish to compile to Microsoft platform
without using any Microsoft resources.

Best Regards,
Alon Bar-Lev


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


Re: [openssl.org #1451] PATCH (Re: Cross compile OpenSSL in Linux using MinGW32)

2007-09-01 Thread Alon Bar-Lev via RT
On Saturday 01 September 2007, Alon Bar-Lev via RT wrote:
> 
> Hello,
> 
> An update.
> 1. The issue with OPENSSL_IMPLEMENT_GLOBAL is gone now.
> 2. Merged with Roumen Petrov's patch:
> http://rt.openssl.org/Ticket/Display.html?id=1552
> 
> Except of not postfix engine dlls with eay32.
> 
> Best Regards,
> Alon Bar-Lev.

As attachment to make rt happy?



openssl-mingw32.patch.gz
Description: GNU Zip compressed data


Re: [openssl.org #1552] mingw patch for openssl-cvs

2007-09-01 Thread Alon Bar-Lev via RT
On Friday 03 August 2007, Roumen Petrov via RT wrote:
> And now against CVS
> 
> 
> 

Merged patch available at:
http://rt.openssl.org/Ticket/Display.html?id=1552

Best Regards,
Alon Bar-Lev.


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


Re: [openssl.org #1451] PATCH (Re: Cross compile OpenSSL in Linux using MinGW32)

2007-09-01 Thread Alon Bar-Lev via RT

Hello,

An update.
1. The issue with OPENSSL_IMPLEMENT_GLOBAL is gone now.
2. Merged with Roumen Petrov's patch:
http://rt.openssl.org/Ticket/Display.html?id=1552

Except of not postfix engine dlls with eay32.

Best Regards,
Alon Bar-Lev.

---

diff -urNp openssl-SNAP-20070901/Configure 
openssl-SNAP-20070901.mingw32-2/Configure
--- openssl-SNAP-20070901/Configure 2007-08-30 12:00:13.0 +0300
+++ openssl-SNAP-20070901.mingw32-2/Configure   2007-09-01 19:36:32.0 
+0300
@@ -481,7 +481,7 @@ my %table=(
 "BC-32","bcc32WIN32::BN_LLONG DES_PTR RC4_INDEX 
EXPORT_VAR_AS_FN:${no_asm}:win32",
 
 # MinGW
-"mingw", "gcc:-mno-cygwin -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 
-Wall:::MINGW32:-lws2_32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} 
EXPORT_VAR_AS_FN:${x86_coff_asm}:win32:cygwin-shared:-D_WINDLL 
-DOPENSSL_USE_APPLINK:-mno-cygwin -shared:.dll.a",
+"mingw", "gcc:-mno-cygwin -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 
-Wall:::MINGW32:-lws2_32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} 
EXPORT_VAR_AS_FN:${x86_coff_asm}:win32:cygwin-shared:-D_WINDLL 
-DOPENSSL_USE_APPLINK:-mno-cygwin:.dll.a",
 
 # UWIN 
 "UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall:::UWIN::BN_LLONG ${x86_gcc_des} 
${x86_gcc_opts}:${no_asm}:win32",
@@ -1169,13 +1169,16 @@ if (!$no_shared)
 
 if (!$IsMK1MF)
{
+   # add {no-}static-engine to options to allow mkdef.pl to work without 
extra arguments
if ($no_shared)
{
$openssl_other_defines.="#define OPENSSL_NO_DYNAMIC_ENGINE\n";
+   $options.=" static-engine";
}
else
{
$openssl_other_defines.="#define OPENSSL_NO_STATIC_ENGINE\n";
+   $options.=" no-static-engine";
}
}
 
diff -urNp openssl-SNAP-20070901/engines/ccgost/Makefile 
openssl-SNAP-20070901.mingw32-2/engines/ccgost/Makefile
--- openssl-SNAP-20070901/engines/ccgost/Makefile   2007-05-18 
19:02:28.0 +0300
+++ openssl-SNAP-20070901.mingw32-2/engines/ccgost/Makefile 2007-09-01 
19:48:02.0 +0300
@@ -44,20 +44,24 @@ install:
if [ -n "$(SHARED_LIBS)" ]; then \
set -e; \
echo installing $(LIBNAME); \
+   l=${LIBNAME}; \
if [ "$(PLATFORM)" != "Cygwin" ]; then \
+   pfx=lib; \
+   sfx="so"; \
case "$(CFLAGS)" in \
*DSO_BEOS*) sfx="so";; \
*DSO_DLFCN*) sfx="so";; \
*DSO_DL*) sfx="sl";; \
+   *DSO_WIN32*) sfx="dll"; pfx=;; \
*) sfx="bad";; \
esac; \
-   cp lib$(LIBNAME).$$sfx 
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$(LIBNAME).$$sfx.new; \
else \
+   pfx="cyg"; \
sfx="so"; \
-   cp cyg$(LIBNAME).dll 
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$(LIBNAME).$$sfx.new; \
fi; \
-   chmod 555 
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$(LIBNAME).$$sfx.new; \
-   mv -f 
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$(LIBNAME).$$sfx.new 
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$(LIBNAME).$$sfx; \
+   cp $$pfx$$l.$$sfx 
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$$pfx$$l.$$sfx.new; \
+   chmod 555 
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$$pfx$$l.$$sfx.new; \
+   mv -f 
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$$pfx$$l.$$sfx.new 
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$$pfx$$l.$$sfx; \
fi
 
 links:
diff -urNp openssl-SNAP-20070901/engines/Makefile 
openssl-SNAP-20070901.mingw32-2/engines/Makefile
--- openssl-SNAP-20070901/engines/Makefile  2007-05-17 21:01:28.0 
+0300
+++ openssl-SNAP-20070901.mingw32-2/engines/Makefile2007-09-01 
19:47:39.0 +0300
@@ -106,19 +106,21 @@ install:
for l in $(LIBNAMES); do \
( echo installing $$l; \
  if [ "$(PLATFORM)" != "Cygwin" ]; then \
+   pfx=lib; \
case "$(CFLAGS)" in \
*DSO_BEOS*) sfx="so";;  \
*DSO_DLFCN*)sfx="so";;  \
*DSO_DL*)   sfx="sl";;  \
+   *DSO_WIN32*)sfx="dll"; pfx=;;   \
*)  sfx="bad";; \
esac; \
-   cp lib$$l.$$sfx 
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
  else \
+   pfx="cyg"; \
sfx="so"; \
-   cp cyg$$l.dll 
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
   

Re: [openssl.org #1334] Resolved: [PATCH] Cross-compile for Windows from Linux

2007-07-11 Thread Alon Bar-Lev via RT
> You've suggested approach that mimics .bat-based build, i.e. generating
> big flat make-file, while we've chosen to discontinue it in favor of
> Unix-like build procedure, i.e. having make traverse source tree for
> Makefiles [see development branch]. In other words suggested approach is
> not the approach we want/can afford to support. A.

Do you currently support MinGW/cross compile with your new build system?
I don't think the specific approach is the important one. The solution
is important.
The requirement is to build OpenSSL libraries and binaries on none
Win32 architecture.


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


Re: [openssl.org #1334] Resolved: [PATCH] Cross-compile for Windows from Linux

2007-07-10 Thread Alon Bar-Lev via RT
On 7/11/07, Chris Wilson via RT <[EMAIL PROTECTED]> wrote:
> No comments on the tracker entry. Please could you tell me how this is
> resolved?

Also related:
http://rt.openssl.org/Ticket/Display.html?id=1451
http://rt.openssl.org/Ticket/Display.html?id=1552

So there is some work here...

Best Regards,
Alon Bar-Lev.


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


Re: [openssl.org #1451] PATCH (Re: Cross compile OpenSSL in Linux using MinGW32)

2007-05-19 Thread Alon Bar-Lev via RT
[ping]

Passed a long time since I sent this patch.
MinGW cross compile does not work without it.
Is there something wrong with this patch?

http://rt.openssl.org/Ticket/Display.html?id=1451

Thanks!
Alon Bar-Lev.


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


Re: [openssl.org #1451] PATCH (Re: Cross compile OpenSSL in Linux using MinGW32)

2007-03-16 Thread Alon Bar-Lev via RT
Hello,

I don't exactly undersand the maintenance model of OpenSSL.

I would really like to see a milestone set for this issue
(http://rt.openssl.org/Ticket/Display.html?id=1451).

We are waiting for this so that user will not be forced to patch
OpenSSL in order to cross compile it.

I will be glad to see this at one of the snapshots, or be notified
that this is rejected and shared OpenSSL will not be enabled for cross
compile win32.

Thanks!


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


Re: [openssl.org #1451] PATCH (Re: Cross compile OpenSSL in Linux using MinGW32)

2007-02-07 Thread Alon Bar-Lev via RT
Hello,

Can I further help regarding this issue?
Is something wrong with the patch? I will fix per your comments.

Best Regards,
Aon Bar-Lev.


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


[openssl.org #1451] Re: PATCH (Re: Cross compile OpenSSL in Linux using MinGW32)

2006-12-28 Thread Alon Bar-Lev via RT

Hello,

Succeeded in making openssl cross compile correctly!

./Configure --prefix=// --cross-compile-prefix=mingw32- shared mingw

Please also notice that --prefix must receive TWO slashes in order
to install to root (make install INSTALL_PREFIX=/tmp/w32)... Maybe
this also can be corrected.

The major problem is in OPENSSL_IMPLEMENT_GLOBAL macro.

The following code does not compile under gcc:

extern int aaa;
static int aaa = 0;
int main () { return 0; }

You cannot define a variable as static and external at the same time:
> a.c:2: error: static declaration of ‘aaa’ follows non-static declaration
> a.c:1: error: previous declaration of ‘aaa’ was here

So I removed the static from the macro.
I had to do some more modifications.
Please review.

Best Regards,
Alon Bar-Lev.

---

diff -urNp openssl-SNAP-20061228.org/engines/ccgost/Makefile 
openssl-SNAP-20061228/engines/ccgost/Makefile
--- openssl-SNAP-20061228.org/engines/ccgost/Makefile   2006-11-30 
16:00:52.0 +0200
+++ openssl-SNAP-20061228/engines/ccgost/Makefile   2006-12-28 
20:30:12.0 +0200
@@ -44,7 +44,13 @@ install: 
if [ -n "$(SHARED_LIBS)" ]; then \
set -e; \
echo installing $(LIBNAME); \
-   if [ "$(PLATFORM)" != "Cygwin" ]; then \
+   if [ "$(PLATFORM)" = "Cygwin" ]; then \
+   sfx="so"; \
+   cp cyg$(LIBNAME).dll 
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$(LIBNAME).$$sfx.new; \
+   elif [ "$(PLATFORM)" = "mingw" ]; then \
+   sfx="so"; \
+   cp $(LIBNAME).dll 
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$(LIBNAME).$$sfx.new; \
+   else \
case "$(CFLAGS)" in \
*DSO_BEOS*) sfx="so";; \
*DSO_DLFCN*) sfx="so";; \
@@ -52,9 +58,6 @@ install:  
*) sfx="bad";; \
esac; \
cp lib$(LIBNAME).$$sfx 
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$(LIBNAME).$$sfx.new; \
-   else \
-   sfx="so"; \
-   cp cyg$(LIBNAME).dll 
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$(LIBNAME).$$sfx.new; \
fi; \
chmod 555 
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$(LIBNAME).$$sfx.new; \
mv -f 
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$(LIBNAME).$$sfx.new 
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$(LIBNAME).$$sfx; \
diff -urNp openssl-SNAP-20061228.org/engines/Makefile 
openssl-SNAP-20061228/engines/Makefile
--- openssl-SNAP-20061228.org/engines/Makefile  2006-10-20 14:00:59.0 
+0200
+++ openssl-SNAP-20061228/engines/Makefile  2006-12-28 20:30:12.0 
+0200
@@ -103,7 +103,13 @@ install:
set -e; \
for l in $(LIBNAMES); do \
( echo installing $$l; \
- if [ "$(PLATFORM)" != "Cygwin" ]; then \
+ if [ "$(PLATFORM)" = "Cygwin" ]; then \
+   sfx="so"; \
+   cp cyg$$l.dll 
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
+ elif [ "$(PLATFORM)" = "mingw" ]; then \
+   sfx="so"; \
+   cp $$l.dll 
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
+ else \
case "$(CFLAGS)" in \
*DSO_BEOS*) sfx="so";;  \
*DSO_DLFCN*)sfx="so";;  \
@@ -111,9 +117,6 @@ install:
*)  sfx="bad";; \
esac; \
cp lib$$l.$$sfx 
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
- else \
-   sfx="so"; \
-   cp cyg$$l.dll 
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
  fi; \
  chmod 555 
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
  mv -f 
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new 
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx ); \
diff -urNp openssl-SNAP-20061228.org/e_os2.h openssl-SNAP-20061228/e_os2.h
--- openssl-SNAP-20061228.org/e_os2.h   2006-04-12 01:00:21.0 +0300
+++ openssl-SNAP-20061228/e_os2.h   2006-12-28 20:30:12.0 +0200
@@ -275,7 +275,7 @@ extern "C" {
 # define OPENSSL_IMPLEMENT_GLOBAL(type,name)\
extern type _hide_##name;\
type *_shadow_##name(void) { return &_hide_##name; } \
-   static type _hide_##name
+   type _hide_##name
 # define OPENSSL_DECLARE_GLOBAL(type,name) type *_sha