0
votes

I am implementing a socket which accepts connection using TLS. I found some information on SO on how it can be implemented using OpenSSL. Turn a simple socket into an SSL socket

My question is, Do I have to use openssl (or some other library) to implement TLS compatible socket. Is there any standard C methods to implement it?

1

1 Answers

3
votes

There is no standard C library for TLS. There is OpenSSL which is used a lot and works on many platforms but there are also platform specific libraries like SChannel (Microsoft) or Secure Transport (Apple). And there are many more cross-platform like NSS, GnuTLS, Botan, ... . See Wikipedia: Comparison of TLS implementations for more information.

Of course, you could in theory implement everything yourself but TLS is a complex protocol. And implementation of cryptographic stuff are much harder to get fully right than most other programming tasks, so better use an established library.