Re: OpenSSL version 1.0.1g fails to link on Win32

2014-04-10 Thread Geoffrey Coram
Actually, I tried Google, and it split check_winnt into check winnt 
because I didn't put the quotes around it, and hence found lots of 
unrelated pages.

I had only extracted crypto/ and ssl/ from the source tarball, so my 
"search" from Windows Explorer didn't find it.

My own fault in both cases.



On 04/10/2014 13:45, Jeremy Farrell  wrote:
>
> Perhaps, if you already have the source tree available in an 
> environment where you can run findstr on it, and know about findstr.
> Google does a much quicker and easier job on this problem for 
> everyone else, and is arguably more informative since it gives the 
> check-in comments as well as at least some of the definitions and 
> uses.
> 
> > From: Thomas J. Hruska [mailto:shineli...@shininglightpro.com]
> > Sent: Thursday, April 10, 2014 8:53 AM
> > 
> > On 4/9/2014 8:03 PM, Jeremy Farrell wrote:
> > > Googling "check_winnt" suggests openssl/e_os.h.
> > 
> > findstr /sic:"check_winnt" *
> > 
> > Is, IMO, easier and more informative than using Google.  Results 
> in:
> > 
> > apps\apps.c:if (check_winnt())
> > crypto\bio\bss_log.c:   if (check_winnt())
> > crypto\cryptlib.c:if (check_winnt() && OPENSSL_isservice() > 
> 0)
> > crypto\rand\rand_win.c:  if (check_winnt() && 
> OPENSSL_isservice()>0)
> > e_os.h:#  define check_winnt() (1)
> > e_os.h:#  define check_winnt() (GetVersion() < 0x8000)
> > 
> > Used four times, has two #defines.
> > 
> > --
> > Thomas Hruska
> > Shining Light Productions
> > 
> > Home of BMP2AVI and Win32 OpenSSL.
> > http://www.slproweb.com/
> 
> 
> __
> OpenSSL Project 
> http://www.openssl.org
> User Support Mailing List
> openssl-users@openssl.org
> Automated List Manager   
> majord...@openssl.org

__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


Re: OpenSSL version 1.0.1g fails to link on Win32

2014-04-10 Thread Geoffrey Coram
On 04/10/2014 05:31, Mike Bonnain  wrote:
>
> Hi Geoffrey,
> 
> It's defined in e_os.h because it's been deprecated in Win8. 
> Microsoft wants you to use GetVersionEx() or VerifyVersionInfo(). 
> Part of their plot to convince us old-timers that the world is no 
> longer flat and that COM is actually a reasonable way to write 
> code... Next thing they will tell us will probably be that the earth
> is no longer the center of the universe.
> 
> -mike

They'd probably fall off a chair if they knew I was still compiling 
for Windows CE 2.0 ... :)
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


RE: OpenSSL version 1.0.1g fails to link on Win32

2014-04-10 Thread Jeremy Farrell
Perhaps, if you already have the source tree available in an environment where 
you can run findstr on it, and know about findstr. Google does a much quicker 
and easier job on this problem for everyone else, and is arguably more 
informative since it gives the check-in comments as well as at least some of 
the definitions and uses.

> From: Thomas J. Hruska [mailto:shineli...@shininglightpro.com]
> Sent: Thursday, April 10, 2014 8:53 AM
> 
> On 4/9/2014 8:03 PM, Jeremy Farrell wrote:
> > Googling "check_winnt" suggests openssl/e_os.h.
> 
> findstr /sic:"check_winnt" *
> 
> Is, IMO, easier and more informative than using Google.  Results in:
> 
> apps\apps.c:if (check_winnt())
> crypto\bio\bss_log.c:   if (check_winnt())
> crypto\cryptlib.c:if (check_winnt() && OPENSSL_isservice() > 0)
> crypto\rand\rand_win.c:  if (check_winnt() && OPENSSL_isservice()>0)
> e_os.h:#  define check_winnt() (1)
> e_os.h:#  define check_winnt() (GetVersion() < 0x8000)
> 
> Used four times, has two #defines.
> 
> --
> Thomas Hruska
> Shining Light Productions
> 
> Home of BMP2AVI and Win32 OpenSSL.
> http://www.slproweb.com/
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


Re: [Bulk] Re: OpenSSL version 1.0.1g fails to link on Win32

2014-04-10 Thread Gisle Vanem

"Thomas J. Hruska"  wrote:


Is, IMO, easier and more informative than using Google.  Results in:

apps\apps.c:if (check_winnt())
crypto\bio\bss_log.c:   if (check_winnt())
crypto\cryptlib.c:if (check_winnt() && OPENSSL_isservice() > 0)
crypto\rand\rand_win.c:  if (check_winnt() && OPENSSL_isservice()>0)
e_os.h:#  define check_winnt() (1)
e_os.h:#  define check_winnt() (GetVersion() < 0x8000)


The full lines are:

 #if defined(_MSC_VER) && _MSC_VER>=1800
 #  define check_winnt() (1)
 #else
 #  define check_winnt() (GetVersion() < 0x8000)
 #endif

So what if I use MSVC v16 to build and run on Win-Vista+?
Maybe the code should test the WINVER/_WIN32_WINNT
versions before testing _MSC_VER?

--gv
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


Re: OpenSSL version 1.0.1g fails to link on Win32

2014-04-10 Thread Mike Bonnain
Hi Geoffrey,

It's defined in e_os.h because it's been deprecated in Win8. Microsoft
wants you to use GetVersionEx() or VerifyVersionInfo(). Part of their plot
to convince us old-timers that the world is no longer flat and that COM is
actually a reasonable way to write code... Next thing they will tell us
will probably be that the earth is no longer the center of the universe.

-mike


On Thu, Apr 10, 2014 at 1:52 AM, Thomas J. Hruska <
shineli...@shininglightpro.com> wrote:

> On 4/9/2014 8:03 PM, Jeremy Farrell wrote:
>
>> Googling "check_winnt" suggests openssl/e_os.h.
>>
>
> findstr /sic:"check_winnt" *
>
> Is, IMO, easier and more informative than using Google.  Results in:
>
> apps\apps.c:if (check_winnt())
> crypto\bio\bss_log.c:   if (check_winnt())
> crypto\cryptlib.c:if (check_winnt() && OPENSSL_isservice() > 0)
> crypto\rand\rand_win.c:  if (check_winnt() && OPENSSL_isservice()>0)
> e_os.h:#  define check_winnt() (1)
> e_os.h:#  define check_winnt() (GetVersion() < 0x8000)
>
> Used four times, has two #defines.
>
> --
> Thomas Hruska
> Shining Light Productions
>
> Home of BMP2AVI and Win32 OpenSSL.
> http://www.slproweb.com/
>
> __
> OpenSSL Project http://www.openssl.org
> User Support Mailing Listopenssl-users@openssl.org
> Automated List Manager   majord...@openssl.org
>


Re: OpenSSL version 1.0.1g fails to link on Win32

2014-04-10 Thread Geoffrey Coram
Thanks, Thomas; I had found the calls in the crypto/ source files, but
I didn't search at the right level to find the #defines. 

After updating e_os.h, I am now able to compile & link the original 
source code for 1.0.1g.  Sorry for the false alarm.


On 04/10/2014 03:52, "Thomas J. Hruska" 
 wrote:
>
> On 4/9/2014 8:03 PM, Jeremy Farrell wrote:
> > Googling "check_winnt" suggests openssl/e_os.h.
> 
> findstr /sic:"check_winnt" *
> 
> Is, IMO, easier and more informative than using Google.  Results in:
> 
> apps\apps.c:if (check_winnt())
> crypto\bio\bss_log.c:   if (check_winnt())
> crypto\cryptlib.c:if (check_winnt() && OPENSSL_isservice() > 0)
> crypto\rand\rand_win.c:  if (check_winnt() && OPENSSL_isservice()>0)
> e_os.h:#  define check_winnt() (1)
> e_os.h:#  define check_winnt() (GetVersion() < 0x8000)
> 
> Used four times, has two #defines.
> 
> -- 
> Thomas Hruska
> Shining Light Productions
> 
> Home of BMP2AVI and Win32 OpenSSL.
> http://www.slproweb.com/
> 
> 
> __
> OpenSSL Project 
> http://www.openssl.org
> User Support Mailing List
> openssl-users@openssl.org
> Automated List Manager   
> majord...@openssl.org

__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


Re: OpenSSL version 1.0.1g fails to link on Win32

2014-04-10 Thread Thomas J. Hruska

On 4/9/2014 8:03 PM, Jeremy Farrell wrote:

Googling "check_winnt" suggests openssl/e_os.h.


findstr /sic:"check_winnt" *

Is, IMO, easier and more informative than using Google.  Results in:

apps\apps.c:if (check_winnt())
crypto\bio\bss_log.c:   if (check_winnt())
crypto\cryptlib.c:if (check_winnt() && OPENSSL_isservice() > 0)
crypto\rand\rand_win.c:  if (check_winnt() && OPENSSL_isservice()>0)
e_os.h:#  define check_winnt() (1)
e_os.h:#  define check_winnt() (GetVersion() < 0x8000)

Used four times, has two #defines.

--
Thomas Hruska
Shining Light Productions

Home of BMP2AVI and Win32 OpenSSL.
http://www.slproweb.com/
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


RE: OpenSSL version 1.0.1g fails to link on Win32

2014-04-09 Thread Jeremy Farrell
Googling "check_winnt" suggests openssl/e_os.h.

> From: Geoffrey Coram [mailto:gjco...@gmail.com]
> Sent: Thursday, April 10, 2014 3:27 AM
> 
> Thanks for the report.  Is "check_winnt()" in the Windows libraries or
> in OpenSSL?  I tried Googling it, but didn't come up with anything,
> and I didn't find a declaration in the OpenSSL source code.
> 
> I do nmake -f ntlib.mak, which makes some static libraries for me,
> using only code in crypto/ and ssl/  I suppose if check_winnt() is in
> a different directory, that would be my problem (and my fault for not
> re-running perl Configure).
> 
> -Geoffrey
> 
> On 04/09/2014 21:58, Steven Kneizys  wrote:
> >
> > I just compiled 32 bit with "ntdll.mak" with "nasm 2.11.02" and
> > Visual Studio Express 2013 with no issues, with and without the
> > "DOPENSSL_NO_HEARTBEATS" option.  I was making it to drop the keys
> > files
> > into Apache 2.2.26:
> > openssl.exe
> > ssleay32.dll
> > libeay32.dll
> >
> > I am doing this to compile:
> >   perl Configure VC-WIN32 --prefix=C:\ApacheSoftware\Apache22\bin
> > --openssldir=C:\ApacheSoftware\Apache22\conf
> >   ms\do_nasm
> >   nmake -f ms\ntdll.mak
> >
> > I know this is in the docs and such but so many people are working
> > in this right now I just thought I'd post that it can work OK with a
> > newer VS version.
> >
> > Steve...
> >
> >
> > On Wed, Apr 9, 2014 at 9:36 PM, Geoffrey Coram 
> > wrote:
> >
> > > Hi -
> > > I just compiled OpenSSL 1.0.1g for Win32 using Visual Studio 2005;
> > my
> > > application failed to link because of an unresolved external
> > > _check_winnt
> > >
> > > In crypto/rand/rand_win.c, function readscreen, this line:
> > >   if (GetVersion() < 0x8000 && OPENSSL_isservice()>0)
> > >
> > > was changed to
> > >   if (check_winnt() && OPENSSL_isservice()>0)
> > >
> > >
> > > And also in crypto/cryptlib.c, function OPENSSL_showfatal, this
> > line:
> > > if (GetVersion() < 0x8000 && OPENSSL_isservice() > 0)
> > >
> > > was changed to
> > > if (check_winnt() && OPENSSL_isservice() > 0)
> > >
> > >
> > > I can't seem to find where check_winnt() is declared/defined.  So,
> > > I just changed it back.  This seems to work for me, but I thought
> > > I should mention it for other users.
> > >
> > > -Geoffrey
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


Re: OpenSSL version 1.0.1g fails to link on Win32

2014-04-09 Thread Geoffrey Coram
Thanks for the report.  Is "check_winnt()" in the Windows libraries or
in OpenSSL?  I tried Googling it, but didn't come up with anything, 
and I didn't find a declaration in the OpenSSL source code.

I do nmake -f ntlib.mak, which makes some static libraries for me, 
using only code in crypto/ and ssl/  I suppose if check_winnt() is in 
a different directory, that would be my problem (and my fault for not 
re-running perl Configure).

-Geoffrey




On 04/09/2014 21:58, Steven Kneizys  wrote:
>
> I just compiled 32 bit with "ntdll.mak" with "nasm 2.11.02" and 
> Visual Studio Express 2013 with no issues, with and without the
> "DOPENSSL_NO_HEARTBEATS" option.  I was making it to drop the keys 
> files
> into Apache 2.2.26:
> openssl.exe
> ssleay32.dll
> libeay32.dll
> 
> I am doing this to compile:
>   perl Configure VC-WIN32 --prefix=C:\ApacheSoftware\Apache22\bin
> --openssldir=C:\ApacheSoftware\Apache22\conf
>   ms\do_nasm
>   nmake -f ms\ntdll.mak
> 
> I know this is in the docs and such but so many people are working 
> in this right now I just thought I'd post that it can work OK with a
> newer VS version.
> 
> Steve...
> 
> 
> On Wed, Apr 9, 2014 at 9:36 PM, Geoffrey Coram  
> wrote:
> 
> > Hi -
> > I just compiled OpenSSL 1.0.1g for Win32 using Visual Studio 2005;
> my
> > application failed to link because of an unresolved external
> > _check_winnt
> >
> > In crypto/rand/rand_win.c, function readscreen, this line:
> >   if (GetVersion() < 0x8000 && OPENSSL_isservice()>0)
> >
> > was changed to
> >   if (check_winnt() && OPENSSL_isservice()>0)
> >
> >
> > And also in crypto/cryptlib.c, function OPENSSL_showfatal, this 
> line:
> > if (GetVersion() < 0x8000 && OPENSSL_isservice() > 0)
> >
> > was changed to
> > if (check_winnt() && OPENSSL_isservice() > 0)
> >
> >
> > I can't seem to find where check_winnt() is declared/defined.  So,
> > I just changed it back.  This seems to work for me, but I thought 
> > I should mention it for other users.
> >
> > -Geoffrey
> > 
> 
> __
> > OpenSSL Project 
> http://www.openssl.org
> > User Support Mailing List
> openssl-users@openssl.org
> > Automated List Manager   
> majord...@openssl.org
> >
> 
> 
> 
> -- 
> Steve Kneizys
> Senior Business Process Engineer
> Voice: (610) 256-1396  [For Emergency Service (888)864-3282]
> Ferrilli Information Group -- Quality Service and Solutions for 
> Higher
> Education
> web: http://www.ferrilli.com/ 
> 
> Making you a success while exceeding your expectations.

__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


Re: OpenSSL version 1.0.1g fails to link on Win32

2014-04-09 Thread Steven Kneizys
I just compiled 32 bit with "ntdll.mak" with "nasm 2.11.02" and Visual
Studio Express 2013 with no issues, with and without the
"DOPENSSL_NO_HEARTBEATS" option.  I was making it to drop the keys files
into Apache 2.2.26:
openssl.exe
ssleay32.dll
libeay32.dll

I am doing this to compile:
  perl Configure VC-WIN32 --prefix=C:\ApacheSoftware\Apache22\bin
--openssldir=C:\ApacheSoftware\Apache22\conf
  ms\do_nasm
  nmake -f ms\ntdll.mak

I know this is in the docs and such but so many people are working in this
right now I just thought I'd post that it can work OK with a newer VS
version.

Steve...


On Wed, Apr 9, 2014 at 9:36 PM, Geoffrey Coram  wrote:

> Hi -
> I just compiled OpenSSL 1.0.1g for Win32 using Visual Studio 2005; my
> application failed to link because of an unresolved external
> _check_winnt
>
> In crypto/rand/rand_win.c, function readscreen, this line:
>   if (GetVersion() < 0x8000 && OPENSSL_isservice()>0)
>
> was changed to
>   if (check_winnt() && OPENSSL_isservice()>0)
>
>
> And also in crypto/cryptlib.c, function OPENSSL_showfatal, this line:
> if (GetVersion() < 0x8000 && OPENSSL_isservice() > 0)
>
> was changed to
> if (check_winnt() && OPENSSL_isservice() > 0)
>
>
> I can't seem to find where check_winnt() is declared/defined.  So, I
> just changed it back.  This seems to work for me, but I thought I
> should mention it for other users.
>
> -Geoffrey
> __
> OpenSSL Project http://www.openssl.org
> User Support Mailing Listopenssl-users@openssl.org
> Automated List Manager   majord...@openssl.org
>



-- 
Steve Kneizys
Senior Business Process Engineer
Voice: (610) 256-1396  [For Emergency Service (888)864-3282]
Ferrilli Information Group -- Quality Service and Solutions for Higher
Education
web: http://www.ferrilli.com/ 

Making you a success while exceeding your expectations.