sample code for TCP server/client connection using windows CNG

Yelamanchi 1 Reputation point
2021-03-02T06:22:11.08+00:00

Hi,

I am looking for sample code (preferably in C/C++) that establishes an SSL/TLS Connection between TCP client and server using windows CNG. I tried to find the sample code for this, but not able to get it anywhere.

Please help me to find the samples.
Any help is greatly appreciated. Thanks.

Windows development Windows API - Win32
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Wilhelm Noeker 1 Reputation point
    2021-04-29T13:19:44.887+00:00

    If you really want to use the SSL provider functions in CNG, may I ask why? Schannel has not become deprecated, as far as I know, and for Schannel, there is client/server sample code in the Server 2003 platform SDK (in Samples\Security\SSPI\SSL).

    I just noticed that there is a new Cryptographic Provider Development Kit, apparently released just a month ago. It claims to be an updated version of the CNG SDK (which is why I noticed it at all), but its emphasis is of course on implementing cryptography providers, not clients. The new release notes even say: "Code samples which demonstrate how to use the CNG API have been moved to the Windows SDK." But even in the CNG SDK that I used to know, there was sample code for an SSL provider, but not for an SSL client.

    Good luck.

    0 comments No comments

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.