Search code examples
javadb2datasourcekeystorehikaricp

DB2 DataSource properties for KeyStore are nowhere to be found


I'm using db2 datasource with Hikari and I'm trying to set my keystore location and password using either datasource properties with addDataSourceProperty or using query params in the url with setJdbcUrl.

I'm trying to do it like that instead of setting the keystore location and password with system properties using setProperty which is currently working.

However, when I try to use the properties db2.jcc.DB2BaseDataSource.sslKeyStoreLocation, db2.jcc.DB2BaseDataSource.sslKeyStorePassword, and db2.jcc.DB2BaseDataSource.sslKeyStoreType, the DB2BaseDataSource class can't find those fields.

Please help if you can, I've been banging my head on this because apparently it's how I'm supposed to do it.

https://www.ibm.com/support/knowledgecenter/en/SSEPEK_11.0.0/java/src/tpc/imjcc_r0052075.html#imjcc_r0052075__tblcfgpr2

https://www.ibm.com/support/knowledgecenter/SSEPGG_9.7.0/com.ibm.db2.luw.apdv.java.doc/src/tpc/imjcc_r0021822.html


Solution

  • The following properties are introduced in driver version 4.23 as stated at the link in the question.

    db2.jcc.DB2BaseDataSource.sslKeyStoreLocation
    db2.jcc.DB2BaseDataSource.sslKeyStoreType
    db2.jcc.DB2BaseDataSource.sslKeyStorePassword