title: connecting to postgres through hibernate using tls/ssl
body: <p>I'm trying to enable TLS/SSL connection between app server and postgres database.  I've followed the directions from postgres and I have disabled all connections except secure.  As per the docs, I've tested the connection with psql command and I can connect securely.  My environment has contains both datasource, JDBC Driver and hibernate.  I've been able to connect securely with a datasource and JDBC driver, but no luck with hibernate.  Below is the string that is working with datasource/JDBC driver.</p>
  
  <pre><code>String url = "jdbc:postgresql://%s:%d/postgres?user=%s&amp;password=%s&amp;ssl=true&amp;sslfactory=org.postgresql.ssl.NonValidatingFactory"
  </code></pre>
  
  <p>For hibernate (not working):</p>
  
  <pre><code>&lt;property name="hibernate.connection.url" value="jdbc:postgresql://127.0.0.1:5432/DB?ssl=true&amp;amp;sslfactory=org.postgresql.ssl.NonValidatingFactory"/&gt;
  &lt;property name="hibernate.connection.url" value="jdbc:postgresql://127.0.0.1:5432/DB?ssl=true&amp;sslfactory=org.postgresql.ssl.NonValidatingFactory"/&gt;
  &lt;property name="hibernate.connection.url" value="jdbc:postgresql://127.0.0.1:5432/DB?ssl=true"/&gt;
  </code></pre>
  
  <p>I'm using Hibernate org.hibernate.c3p0.internal.C3P0ConnectionProvider if that matters.</p>
  
  <p>Any ideas?</p>
  
  <p>Thanks!</p>