title: Redshift JDBC connection: Using SSL certificate file without putting it into truststore?
body: <p>I would like to set up SSL when connecting to Redshift with JDBC, and use the Redshift certificate to verify the connection.</p>
  
  <p>Redshift docs at <a href="http://docs.aws.amazon.com/redshift/latest/mgmt/connecting-ssl-support.html" rel="nofollow noreferrer">http://docs.aws.amazon.com/redshift/latest/mgmt/connecting-ssl-support.html</a> describe that I need to add the redshift key from <a href="https://s3.amazonaws.com/redshift-downloads/redshift-ssl-ca-cert.pem" rel="nofollow noreferrer">https://s3.amazonaws.com/redshift-downloads/redshift-ssl-ca-cert.pem</a> to a truststore.</p>
  
  <p>However, I would not like to add the certificate to a truststore, but use the certificate file directly. As described on docs.aws.amazon.com/redshift/latest/mgmt/configure-jdbc-options.html, JDBC has the option sslCert to specify the path to the certificate file directly. But when sslCert is specified, it requires me to also specify the sslKey option, which as far as I understand is the private key of the certificate.
  Why is that? Why do I need to also have the key when using the certificate from a file and not from a truststore? Is there any other way to setup it without adding it to a truststore (and performing verification, so not a NonValidatingFactory)?</p>