title: Enabling SSL with MySQL RDS in Hibernate
body: <p>I am trying to connect securely to RDS instance from Hibernate. Relevant properties in my hibernate.cfg file looks like this.</p>
  
  <pre><code>&lt;property name="connection.url"&gt;
              jdbc:mysql://&lt;endpoint&gt;/&lt;db&gt;?autoReconnect=true&amp;amp;useUniCode=true&amp;amp;characterEncoding=UTF-8&amp;amp;useSSL=true     
  &lt;/property&gt;
  &lt;property name="dialect"&gt; org.hibernate.dialect.MySQLDialect &lt;/property&gt;    
  &lt;property name="connection.verifyServerCertificate"&gt;false&lt;/property&gt;
  &lt;property name="connection.requireSSL"&gt;true&lt;/property&gt;
  </code></pre>
  
  <p>But I am getting following exception.</p>
  
  <pre><code>Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
  </code></pre>
  
  <p>Do I need to configure something on my RDS instance as well?</p>
  
  <p>Thanks,</p>