I'm trying to write/modify a metasploit module to find out which ciphers are supported by a server (for scanning purposes). Will I have to enumerate the ciphers, by trying them all out, or is there a way I can request from the server which ciphers it supports?
So far I've only been able to find out which modules are supported by my local openssl version.
When I want to read information about a certificate, I can do it using:
cert = OpenSSL::X509::Certificate.new(sock.peer_cert)
print_status("#{ip}:#{rport} Public Key: #{cert.public_key}")
Is there something similar for ciphers?