mirror of
https://github.com/openssl/openssl.git
synced 2024-12-27 06:21:43 +08:00
86db958835
Update makefiles so that consistent patterns are used. Object files are compiled from source using an implicit rule (but using our CFLAGS); for linking, we give an explicit rule. Ensure that "make test" works in each subdirectory (even if it does not actually run any applications). The top-level demo makefile now works. The makefiles are not make-agnostic. e.g. they use the variable $(RM) in "clean" recipes, which is defined in gnu-make but may not be defined in others. Part of #17806 Testing: $ cd demo $ make test Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22698) |
||
---|---|---|
.. | ||
A-SSL-Docs.txt | ||
cert.pem | ||
key.pem | ||
main.c | ||
Makefile | ||
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.