JDBC + SSL = "No trusted certificate found"
From: Luke McCarthy (luke.mccarthy_at_shaw.ca)
Date: 06/24/04
- Next message: Hitesh B: "Secure JDBC for SQL Server"
- Previous message: Lee Fesperman: "Re: POD speed"
- Next in thread: Roedy Green: "Re: JDBC + SSL = "No trusted certificate found""
- Reply: Roedy Green: "Re: JDBC + SSL = "No trusted certificate found""
- Reply: Luke McCarthy: "Re: JDBC + SSL = "No trusted certificate found" (RESOLVED)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 24 Jun 2004 11:31:20 -0600
Hi,
I'm trying to get JDBC to connect to a MySQL database using SSL. The MySQL
server has been propertly compiled and configured, and I can connect to it
with the regular client using SSL, but I can't get a simple test client
written in Java to work.
The error I'm getting is "No trusted certificate found", but I have
imported the CA cert I used to sign the MySQL server key into a truststore
and I'm using that truststore in my code. The relevant steps look like
this:
# CA cert created like so:
$ openssl req -new -x509 -keyout cakey.pem -out cacert.pem
# MySQL server certificate verified like so:
$ openssl verify -CAfile cacert.pem server-cert.pem
server-cert.pem: OK
# truststore created like so:
$ keytool -import -file cacert.pem -alias mysqlServerCACert -keystore
truststore
/* java code looks like this: */
System.setProperty("javax.net.debug", "all");
System.setProperty("javax.net.ssl.trustStore",
"/home/lukem/src/ssl/truststore");
System.setProperty("javax.net.ssl.trustStorePassword", "password");
During execution, the debug information shows that it's using the expected
truststore and that it's adding my certificate:
...
trustStore is: /home/lukem/src/ssl/truststore
...
adding as trusted cert:
Subject: CN=lewzealand, OU=bioinfo, O=Uni, L=Sask, ST=Sask, C=CA
...
But I still get the "No trusted certificate found" error. Any idea what
the problem might be? Thanks,
Luke
- Next message: Hitesh B: "Secure JDBC for SQL Server"
- Previous message: Lee Fesperman: "Re: POD speed"
- Next in thread: Roedy Green: "Re: JDBC + SSL = "No trusted certificate found""
- Reply: Roedy Green: "Re: JDBC + SSL = "No trusted certificate found""
- Reply: Luke McCarthy: "Re: JDBC + SSL = "No trusted certificate found" (RESOLVED)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|