Reputation: 4080
I am using imap with gmail, and I am using the ssl.create_default_context()
method to set up the SSL connection. I was wondering how I can
check what cypher is being used on a given connection started with the IMAP4_SSL constructor
ensure that only cyphers from TLSv1.2 or higher are being used.
Upvotes: 0
Views: 24
Reputation: 4080
I'll post what I found to help others doing the same thing. It seems the easiest way to examine the connection is to do packet inspection in wireshark. I followed the steps in this tutorial. Basically, call ping on your imap server, then put ip.addr == as a filter and run your script. Look for the "server hello" tls packet in the list of activity to find the negotiated cypher and protocol version.
Upvotes: 0