Can we access legacy CSP with CNG?

sabrina hou 1 Reputation point
2020-10-26T01:40:52.497+00:00

Our product enables the user to login with Smart Card certificate and local stored certificate. We are enhancing our application to support the certificates which are issued from CNG Key Storage Provider.

For Smart Card minidriver, it can register on both legacy CSP and KSP. So we can sign/encrypt the data with Smart Card using CryptoAPI or CNG API.
But for the local installed certificate, we need to detect the certificate's credential provider and invoke CryptoAPI or CNG API to perform crypto-operation. For the certificate issued with legacy CSP, it needs to invoke the deprecated CryptoAPI to perform perform crypto-operation. For the certificate issued with KSP, it can invoke the NCG to perform perform crypto-operation. If we still want to support the certificate issued from legacy CSP, we still need to use the CryptoAPI. Because the customer may not migrate their issued certificate from legacy CSP to KSP. So what is best practice to handle this use case.

My question is whether the Microsoft provider the similar way for Smart Card to handle software certificate. In this case, we can invoke CNG API to perform crypto-operation for the certficate issued with legacy CSP.

My questions:

  1. Can we access legacy CSP with CNG?
  2. What's is the Microsoft's plan to remove the legacy CSP support?
  3. Why some CryptoAPI are deprecated? But we still allow the customer to issue certificate from the legacy CSP.
Windows development | Windows API - Win32
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.