Re: [openssl.org #2137] [PATCH] mingw fixups
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 #includesome symbols should be removed. >>> Also, there is no need to #includeif 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.h2009-08-26 18:13:43.0 +0300 >>> +++ openssl-1.0.0-beta4/e_os.h2010-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
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 #includesome symbols should be removed. Also, there is no need to #includeif 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.h2009-08-26 18:13:43.0 +0300 +++ openssl-1.0.0-beta4/e_os.h2010-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
[openssl.org #2138] [PATCH] Change needed for "-DPURIFY" builds.
This patch fixes a bug with the -DPURIFY flag. The stat structure contains padding and unused fields that are not initialized with the stat call. This causes applications such as Valgrind to be unable to analyze OpenSSL executables that are compiled with the -DPURIFY flag. This is for OpenSSL v0.9.8l. I've tested this on Centos 5.4. --Kevin crypto/rand/randfile.c : @@ -102,6 +102,14 @@ if (file == NULL) return(0); +#ifdef PURIFY +/* struct stat has padding and unused fields that may not be + * initialized in the call to stat(). We need to clear the entire + * structure before calling RAND_add() to avoid complaints from + * applications such as Valgrind. + */ +memset(&sb, 0, sizeof(sb)); +#endif if (stat(file,&sb) < 0) return(0); RAND_add(&sb,sizeof(sb),0.0); if (bytes == 0) return(ret); This patch fixes a bug with the –DPURIFY flag. The stat structure contains padding and unused fields that are not initialized with the stat call. This causes applications such as Valgrind to be unable to analyze OpenSSL executables that are compiled with the –DPURIFY flag. This is for OpenSSL v0.9.8l. I’ve tested this on Centos 5.4. --Kevin crypto/rand/randfile.c :@@ -102,6 +102,14 @@ if (file == NULL) return(0); +#ifdef PURIFY+ /* struct stat has padding and unused fields that may not be+ * initialized in the call to stat(). We need to clear the entire+ * structure before calling RAND_add() to avoid complaints from+ * applications such as Valgrind.+ */+ memset(&sb, 0, sizeof(sb));+#endif if (stat(file,&sb) < 0) return(0); RAND_add(&sb,sizeof(sb),0.0); if (bytes == 0) return(ret);
Re: [openssl.org #2137] [PATCH] mingw fixups
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