better code structure for ssl testing