0

Microsoft 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

jww
  • 97,681
  • 90
  • 411
  • 885
Raj
  • 1,113
  • 1
  • 17
  • 34

2 Answers2

1

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);
    }
}
Mat
  • 202,337
  • 40
  • 393
  • 406
1

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.

Sani Huttunen
  • 23,620
  • 6
  • 72
  • 79
  • I am sure that windows 7 and server 2008 has got CNG which is backward compatible with older version - cryptoAPI; My question question is whether windows-7 supports the older - cryptoAPI? – Raj Oct 07 '09 at 14:33
  • As stated. The CryptoAPI in Win7 is backwardscompatible with the cryptoAPI in WinXP, etc. The CNG in Win7s CryptoAPI is NOT backwardscompatible with the CryptoAPI in WinXP, etc. since there is no CNG in those operating systems CryptoAPI. – Sani Huttunen Oct 07 '09 at 14:47