title: How do I inspect the SQL Server side SSL certificate used in SqlConnection?
body: <p>I use <code>SqlConnection</code> class to connect to a SQL Server using a connection string with "encrypt data" set. I want to access the server side SSL certificate and find when it expires. If I used <code>HttpWebRequest</code> I would access its <code>ServicePoint</code> property that provides access to the server certificate. Looks like <code>SqlConnection</code> does not provide a similar property.</p>
  
  <p>How do I access the server certificate when using <code>SqlConnection</code>?</p>