[reSIProcate] WinSecurity compiler error

Scott Godin sgodin at sipspectrum.com
Mon May 12 14:20:25 CDT 2014


Looks good to me - I will commit this - thanks!

Scott


On Mon, May 12, 2014 at 11:58 AM, Dario Bozzali
<Dario.Bozzali at ifmgroup.it>wrote:

>  Hi all,
>
> I updated my Resiprocate repository to last revision (11170).
>
> I tried to build Resiprocate using reSIProcate_8_0.sln (my operating
> system is Windows 8.1) and I obtained the following error in
> WinSecurity.cxx:
>
> 1>WinSecurity.cxx
>
> 1>.\ssl\WinSecurity.cxx(357) : error C2065: 'CERT_NCRYPT_KEY_SPEC' :
> undeclared identifier
>
> 1>.\ssl\WinSecurity.cxx(359) : error C3861: 'NCryptFreeObject': identifier
> not found
>
> Instead using reSIProcate_9_0.sln WinSecurity.cxx compiles properly.
>
> I understood that the issue is due to Wincrypt.h. On Windows XP and
> Windows 2003 CERT_NCRYPT_KEY_SPEC is undefined, so dwKeySpec cannot be
> CERT_NCRYPT_KEY_SPEC.
>
> Is it possible to change the code to build successfully also using Visual
> C++ 2005?
>
> Could the following code work fine?
>
>                 if(bCallerFreeProvOrNCryptKey)
>
>                 {
>
> #if(_WIN32_WINNT >= 0x0600)
>
>                     if(dwKeySpec == CERT_NCRYPT_KEY_SPEC)
>
>                     {
>
>                         NCryptFreeObject(hCryptProv);
>
>                     }
>
>                     else
>
>                     {
>
>                         CryptReleaseContext(hCryptProv, 0);
>
>                     }
>
> #else
>
>                     CryptReleaseContext(hCryptProv, 0);
>
> #endif // if(_WIN32_WINNT >= 0x0600)
>
>                 }
>
>
>
> Thank you in advance.
>
> Best regards,
>
> Dario.
>
>
>
> _______________________________________________
> 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/20140512/31e7958e/attachment.htm>


More information about the resiprocate-devel mailing list