-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load Keystore Intelligently in the Driver #14
Comments
Thanks for reporting issue. We will look into it. |
Hi Syed, Could you please try using "sslkey" connection option? If this file ends with pk8 then we use JKS, if it ends with p12 then we use PKCS12 key store. Also generate JDBC driver logs using "LogLevel=6;LogPath=my_path" and run your test and send us *.log from my_path directory. Thanks, |
@iggarish , you guys are loading "cacerts" that gets bundled with JDK. I don't have any ssl key with me.
|
Hi Syed,
One think I notice you have JDK11 and I am using JDK8. Am I missing anything? Do you have steps with any sample JDBC program, so I can see the issue? I get you what you are trying to say. But I need to reproduce the issue, fix it and then test it again. |
Hi Syed, I add some code (as per your LoadJava) in my JDBC test to add Bouncy Castle provider and then connect. It works fine. Note that I am using JDK 8.0. This is function I created in my JDBC test connect program:
.... |
I am downloading jdk11.0.8 and trying it. |
I tried my test program but looks like something more missing with JDK11: |
Ok. I downloaded another JDK11 and I can see the issue as follow: |
ok. I fix the code as you suggest and it works fine now: |
This fix will be available in next release plan for end of the month. |
This is great update, thank you so much @iggarish. May I please know the expected release date if its available? |
The release date would help us prepare our plan accordingly. So if you have had that pls do let us know. |
We are planning to release by end of this month. Exact date is not known, because it depends on many factors. But trying to release by 31-Mar. I will update here when actual release is ready. |
Thank you. |
Any update @iggarish ? |
31-Mar is still plan to release. I will update here when I actually release it. |
Thank you. |
Released 2.0.0.4 version. Check README file for download links. |
Driver version
2.0.0.0
Redshift version
PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3), Redshift 1.0.24421
Client Operating System
Ubuntu 18.04
JAVA/JVM version
openjdk version "11.0.8" 2020-07-14
Table schema
Not Applicable
Problem description
JDBC trace logs
Not Needed
Reproduction code
Recommendation
Why don't you load the keystore as follows:
try {
KeyStore keyStore = KeyStore.getInstance("JKS");
keyStore.load(inputStream, passphrase);
// do rest of the logic
} catch (Exception e1) {
try {
KeyStore keyStore = KeyStore.getInstance("PKCS12");
keyStore.load(inputStream, passphrase);
// do rest of the logic
} catch (Exception e2) {
try {
KeyStore keyStore = KeyStore.getInstance("JCEKS");
keyStore.load(inputStream, passphrase);
// do rest of the logic
} catch (Exception e1) {
}
}
}
Note: You have the recreate the inputStream before retrying.
The text was updated successfully, but these errors were encountered: