Fix tls-cipher when invalid ciphers are given
Add external API with security.