refine openssl connection