< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [reSIProcate] WinSecurity compiler error


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

Scott


On Mon, May 12, 2014 at 11:58 AM, Dario Bozzali <Dario.Bozzali@xxxxxxxxxxx> 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@xxxxxxxxxxxxxxx
https://list.resiprocate.org/mailman/listinfo/resiprocate-devel