Do not try to use SNI when pem is not available
Fix test for SNI