simplified a bit the ssl example