Click here to Skip to main content
15,917,709 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
C#
Should i use OpenSSL with bare Winsock? So encrypt the communication. The far i understand the server has the have a Certificate, should i create that certificate using Open/SSL ? 
And on the Client side of Winsock i use OpenCert/****/ Functions to do the rest of the job ( verification ) adding the certificate to the certificate store ? 

Thanks


What I have tried:

Google But did not understand nothing !
Posted
Updated 7-Jun-17 0:53am
Comments
Sergey Alexandrovich Kryukov 28-May-16 21:15pm    
Server certificate has nothing to do with the encryption of your application's communications. The certificate is used as a tool for the users to make sure some site can be trusted, which is the must with HTTPS; which also has nothing to do with your problem. Basically, your question makes no sense, by one simple reason: "should I..?" is inapplicable; what you should do depends on what you want to achieve. If you need security, you have to picture the whole scenario of all operations. What you use bare Winsock, all the protocol layers above the transport layer are on you; you can use some known protocols or develop fully-custom application-layer protocols; in all cases, security is on you, totally.
—SA

1 solution

There is a whole lot more you need to understand before tackling this kind of problem.

Here are the pieces but be warned this is a large topic:

OSI model - Wikipedia
e.g. OpenSSL operates in Layer 6; WinSock in layer 5.

This reference also mentions the network layers model.
HTTPS - Wikipedia

Once you have a grasp of these concepts you may be able to ask a better question, preferably after looking at example code.
In the C++ world you can't go past looking at boost::asio for instance and here's a link to some code to get your heart racing...
GitHub - alexandruc/SimpleHttpsClient: A simple HTTPS client based on Boost Asio.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900