cryptoapi windows 7 support
Mi开发者_开发技巧crosoft has introduced cryptography next generation (CNG) from Vista and server 2008 onwards. But my question is to know whether Microsoft supports the old MS CAPI (say for eg. in windows 2003 and windows xp) in Windows 7 and Server 2008.
Thanks
Raj
Do you mean if Windows 7 and Windows Server 2008 CryptoAPI is backwards compatible with older versions of CryptoAPI then yes.
All new CNG functionality is of course not.
Yes. Windows 7 provides both APIs: CNG and CAPI.
Nevertheless, just try with verfy context:
#include <Wincrypt.h>
#include <stdio.h>
int main()
{
HCRYPTPROV hCryptProv = NULL;
if(CryptAcquireContext(&hCryptProv,NULL,NULL,PROV_RSA_FULL,CRYPT_VERIFYCONTEXT))
{
printf("CryptoAPI working\n\n");
exit(0);
}else
{
printf("Error 0x%.8x",GetLastError());
exit(1);
}
}
精彩评论