demo code for implemeting ssl book