Put ciphers extraction into a function
Add support for different TLS methods