

MIT Applied Security Reading Group 
Windows MSVC++ 6  OpenSSL Example Project
David Molnar 13/10/00 


1. What is this?

This is a README file for sample code provided in conjunction with the 
MIT Applied Security Reading Group seminar on OpenSSL. This sample code
has been tested with Microsoft Visual C++ 6.0 on Windows 98 
and is aimed at getting a Windows programmer up and running a
very very simple OpenSSL application out of the box. 

2. What are these files and folders?

You're reading asrg-readme.txt, which explains this package(or tries to). 
If you clicked on the "Click me to start!" shortcut and have MSVC++ installed,
you should be in the "example.dsw" workspace right now. On your right 
will be two projects:

		1) winsslservtest 
			A small SSL server which opens itself up on port 1111, listens for
			the first connection, services it, and then kills itself. 

		2) winssltest
			A sample SSL client which connects to 127.0.0.1 on port 1111, sends
			a "Hello World!" message, and then kills itself. 

		Both of these are direct adaptations of the code found in the openssl
		distribution under /demos/ssl. I changed the code to use Winsock instead of
		sys/sockets.h and to check for Winsock 2 (I think it would also work without
		the check and Winsock 1.1, but I have not done it)

Example, winssltest, and winsslservtest have their own folders. In addition, there
are two other folders.

		* libs folder -- contains the precompiled static libraries for SSL and 
						Winsock 2
		* inc32 folder -- complete set of OpenSSL include files

		* certs folder -- contains public and private keys for the server. 

3. What do I do now?

Check out OpenSSL in action!

	In theory, it should be as easy as this:

		1) Build winsslservtest. Execute winsslservtest.exe by using the
		option in the Build menu. This starts a server listening on port 1111.
		
		2) Build winssltest. Execute winssltest.exe by using the option in
		the Build menu. This starts a client and causes it to connect to 
		localhost 1111. 

		3) Watch as the client and server exchange Hello World messages over
		a DES encrypted connection. 

		4) Start looking at the code - winssltest.cpp and winsslservtest.cpp
		to figure out just what's going on! 

	In practice, this code has been tested only on one machine. It will probably
	break on your machine. Please report breaks to 
	dmolnar@hcs.harvard.edu , along with nature and any fixes you might find. 
