Make functions to get certificates honour ssl/tls version specififed in options