title: SQLAlchemy verify SSL connection
body: <p>I would like to verify the SSL connection that SQLAlchemy sets up when using <code>create_engine</code> to connect to a PostgreSQL database. For example, if I have the following Python 3 code:</p>
  
  <pre><code>from sqlalchemy import create_engine
  
  conn_string = "postgresql+psycopg2://myuser:******@someserver:5432/somedb"
  
  conn_args = {
      "sslmode": "verify-full",
      "sslrootcert": "/etc/ssl/certs/ca-certificates.crt",
  }
  
  engine = create_engine(conn_string, connect_args=conn_args)
  </code></pre>
  
  <p>I know that I can print the contents of <code>engine.__dict__</code>, but it doesn't contain any information about the SSL settings (TLS version, cipher suite, etc) that it's using to connect:</p>
  
  <pre><code>{
      '_echo': False,
      'dialect': &lt;sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x7f988a217978&gt;,
      'dispatch': &lt;sqlalchemy.event.base.ConnectionEventsDispatch object at 0x7f988938e788&gt;,
      'engine': Engine(postgresql+psycopg2://myuser:******@someserver:5432/somedb),
      'logger': &lt;Logger sqlalchemy.engine.base.Engine (DEBUG)&gt;,
      'pool': &lt;sqlalchemy.pool.impl.QueuePool object at 0x7f988a238c50&gt;,
      'url': postgresql+psycopg2://myuser:******@someserver:5432/somedb
  }
  </code></pre>
  
  <p>I know I can do something like <code>SELECT * FROM pg_stat_ssl;</code>, but does the SQLAlchemy engine store this kind of information as a class attribute / method?</p>
  
  <p>Thank you!</p>