First pass at adding ssl support