[reSIProcate] build broken, missing wincrypt.h in security.hxx

Justin Matthews jmatthewsr at gmail.com
Fri May 29 07:34:48 CDT 2009


This is definitely caused by the SDK include.  Visual studio 2008 comes with
the latest Windows SDK (successor to the platform sdk), so I am not going to
mess around with installing other sdk’s.  

 

I fixed the include problem by moving windows.h above wincrypt.h, but this
caused a winsock2.h include to fail (winsock2.h must always be included
before windows.h).  Adding winsock2.h above the windows.h that I added fixed
this in winsecurity.cxx.

 

Could someone test the attached patch in Visual Studio 2003? 

 

Also, I hate to mention this (because non-windows developers will think it’s
lame), but we could avoid this issue by using a standard include file that
is added to the top of every source file in rutil/dum/stack (include
winsock2.h before windows.h).  As an additional benefit, this file could be
used as a precompiled header that would greatly speed up the builds.

 

Thanks,

 

-justin 

 

From: Matthias Moetje [mailto:moetje at terasens.com] 
Sent: Thursday, May 28, 2009 10:55 PM
To: 'Justin Matthews'; 'Scott Godin'
Cc: 'resiprocate-devel'
Subject: RE: [reSIProcate] build broken, missing wincrypt.h in security.hxx

 

Are you using the PSDK includes that come with Visual Studio?

I think in general it’s best include the full PSDK that is available 

for download..

 

Best regards,

 

Matthias Moetje 





TERASENS GmbH
Augustenstraße 24
80333 Munich
GERMANY

 


Phone:
Fax:
e-mail:
Web:

	+49.89.143370-0
+49.89.143370-22
 <mailto:info at terasens.com> info at terasens.com
 <http://www.terasens.com/> www.terasens.com

 

 

 

 

From: resiprocate-devel-bounces at resiprocate.org
[mailto:resiprocate-devel-bounces at resiprocate.org] On Behalf Of Justin
Matthews
Sent: Freitag, 29. Mai 2009 00:49
To: 'Scott Godin'
Cc: 'resiprocate-devel'
Subject: Re: [reSIProcate] build broken, missing wincrypt.h in security.hxx

 

Looks like this may be related to the version of visual studio. I built
openssl with visual studio 2008 and also built resip with visual studio
2008.  The include paths look different, when compiling winsecurity.cxx,
from the resiprocate visual studio 2005 build.  Some platform sdk includes
are different between 2005 and 2008 builds. Moving wincrypt.h fixes my
issue, but causes the resiprocate project under 2005 to break.

 

Not sure if there is a workaround for all visual studio versions.  Any
suggestions would be appreciated


 

Thanks,

 

-justin 

 

From: Justin Matthews [mailto:jmatthewsr at gmail.com] 
Sent: Thursday, May 28, 2009 3:16 PM
To: 'Scott Godin'
Cc: 'resiprocate-devel'
Subject: RE: [reSIProcate] build broken, missing wincrypt.h in security.hxx

 

I’m using separate .vcproj files (resip,dum,rutil) and building openssl
separate so it must be either the .vcproj differences or the openssl build.
The error occurs when compiling winsecurity.cxx (below).  I did notice this
in ossl_typ.h: 

 

#ifdef OPENSSL_SYS_WIN32

#undef X509_NAME

 

Not sure if it has anything to do with my problem, but makes me think that
my openssl build may be doing something different.

 

1>Compiling...

1>WinSecurity.cxx

\x509v3.h(185) : error C2059: syntax error : 'constant'

1> <my app dir>\3rdparty\openssl\include\openssl\x509v3.h(185) : error
C2059: syntax error : ')'

1> <my app dir>\3rdparty\openssl\include\openssl\x509v3.h(185) : error
C2238: unexpected token(s) preceding ';'

1> <my app dir>\3rdparty\openssl\include\openssl\x509v3.h(193) : error
C2059: syntax error : 'constant'

1> <my app dir>\3rdparty\openssl\include\openssl\x509v3.h(193) : error
C2059: syntax error : ')'

1> <my app dir>\3rdparty\openssl\include\openssl\x509v3.h(193) : error
C2238: unexpected token(s) preceding ';'

1> <my app dir>\3rdparty\openssl\include\openssl\x509v3.h(627) : error
C2065: 'nm' : undeclared identifier

1> <my app dir>\3rdparty\openssl\include\openssl\x509v3.h(627) : error
C2065: 'dn_sk' : undeclared identifier

1> <my app dir>\3rdparty\openssl\include\openssl\x509v3.h(627) : error
C2275: 'STACK' : illegal use of this type as an expression

1>        <my app dir>\3rdparty\openssl\include\openssl\stack.h(74) : see
declaration of 'STACK'

1><my app dir>\3rdparty\openssl\include\openssl\x509v3.h(628) : error C2062:
type 'unsigned long' unexpected  

 

From: slgodin at gmail.com [mailto:slgodin at gmail.com] On Behalf Of Scott Godin
Sent: Thursday, May 28, 2009 2:11 PM
To: Justin Matthews
Cc: resiprocate-devel
Subject: Re: [reSIProcate] build broken, missing wincrypt.h in security.hxx

 

OK - I just switched to openssl 0.9.8k and VS 2008 and I'm not having the
same issue.  I wonder what is different between our configurations. 

 

Scott

On Wed, May 27, 2009 at 9:22 PM, Scott Godin <sgodin at sipspectrum.com> wrote:

Ah - it's probably related to 0.9.8k then, since I'm pretty sure I'm using
an older release.  I try out the newer release when I get a chance, to see
if I see the same thing.

 

Scott

 

On Wed, May 27, 2009 at 5:00 PM, Justin Matthews <jmatthewsr at gmail.com>
wrote:

Using openssl 0.9.8k and the SSL-Debug or SSL-Release config on visual
studio 2008, wincrypt.h needed to be moved ahead of any openssl headers in
winsecurity.cxx:

 

#ifdef USE_SSL

#include <Wincrypt.h>

#include "resip/stack/ssl/WinSecurity.hxx"

 

-justin

 

From: slgodin at gmail.com [mailto:slgodin at gmail.com] On Behalf Of Scott Godin
Sent: Tuesday, May 26, 2009 2:23 PM
To: Justin Matthews
Cc: resiprocate-devel
Subject: Re: [reSIProcate] build broken, missing wincrypt.h in security.hxx

 

I don't require this header in order to build on Windows.  What definitions
are the compiler complaining about being missing?

 

Scott

On Tue, May 26, 2009 at 12:14 PM, Justin Matthews <jmatthewsr at gmail.com>
wrote:

I believe this header is required on Windows?  

 

Thanks,

 

-justin


_______________________________________________
resiprocate-devel mailing list
resiprocate-devel at resiprocate.org
https://list.resiprocate.org/mailman/listinfo/resiprocate-devel

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20090529/796fb343/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 3836 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20090529/796fb343/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wincrypt-include.patch
Type: application/octet-stream
Size: 953 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20090529/796fb343/attachment.obj>


More information about the resiprocate-devel mailing list