openssl/demos/sslecho
Neil Horman 6195c08d10 make addr_len the right sign in sslecho
cygwin caught a signedness difference in this pointer.

Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/24047)
2024-04-12 08:02:20 -04:00
..
A-SSL-Docs.txt
Makefile demos: tidy up makefiles, fix warnings 2023-11-15 08:43:23 +01:00
README.md
build.info Convert demos to primary build system 2024-04-12 08:02:19 -04:00
cert.pem
key.pem
main.c make addr_len the right sign in sslecho 2024-04-12 08:02:20 -04:00

README.md

OpenSSL Simple Echo Client/Server

This project implements a simple echo client/server.

It is a console application, with command line parameters determining the mode of operation (client or server). Start it with no parameters to see usage.

The server code was adapted from the Simple TLS Server on the OpenSSL Wiki. The server code was modified to perform the echo function, and client code was added to open a connection with the server and to send keyboard input to the server.

The new client code illustrates that:

  • Connection to the SSL server starts as a standard TCP 'connect'.
  • Once connected with TCP, the client 'upgrades' to SSL using SSL_connect().
  • When the SSL connection completes, data is sent and received using SSL_write() and SSL_read().
  • Pretty simple.

The cert.pem and key.pem files included are self signed certificates with the "Common Name" of 'localhost'.

Best to create the 'pem' files using an actual hostname.