views:

697

answers:

3

I'm trying to use Hudson (which uses SVNKit) to access a Subversion repository that requires a client certificate to access it. I can access the same repository using the same client certificate via Eclipse (also using SVNKit).

When Hudson tries to check out the repository, it fails with:

org.tmatesoft.svn.core.SVNException: svn: Received fatal alert: handshake_failure

Hudson is running under Tomcat, so I turned on ssl debugging in the Tomcat log (-Djavax.net.debug=ssl).

At the end of the handshake I see:

*** ServerHelloDone
Executor #0 for master : executing eMASS integration #3, SEND SSLv3 ALERT:  warning, description = no_certificate

I'm not sure if that is the crux of the problem or not.

That follows a list of Cert Authorities. I made sure the server's cert root issuer is imported in my cacerts, as well as the intermediate issuer. I still get the same problem.

Any ideas for what to look at?

The log is on pastebin.

A: 

I don`t know exactly, but may be it helps. May be you need to add cerificate to jvm using keystore

Alexey Ogarkov
A: 

Alexey had the right idea.

Log:

SEND SSLv3 ALERT:  warning, description = no_certificate

This was discussed in the Java Programming forum.

Maybe your eclipse and Hudson start with different JREs (client JRE vs. JDK JRE?). Every JRE has its own keystore. This can get quit confusing to configure.

Thomas Jung
They are on different systems, so they are definitely different keystores. On Eclipse, where I can connect, I have added no certs to the cacert. On the Hudson box I have added the server cert issuing authorities to the cacert file.
CoverosGene
Are these different JDK versions? The root certificates change from time to time.
Thomas Jung
Both are JDK 1.6.0_17
CoverosGene
+1  A: 

There were several bugs in Hudson's subversion plugin involving dealing with SSL certs and their passwords. Here's the one I reported, which they have fixed: http://issues.hudson-ci.org/browse/HUDSON-5230. So now, it should properly save the cert you upload.

Upgrade to the latest version of Hudson (Hudson ver. 1.342 or later) and also the latest version of the subversion plugin (1.10, available at https://hudson.dev.java.net/servlets/ProjectDocumentView?documentID=147307&showInfo=true). To install this plugin, download the subversion.hpi file, then in Hudson go to Manage Hudson -> Manage Plugins -> Advanced, and upload it. Then you need to restart Hudson.

commanda
That was it. It now works for me.In the meantime, I had added my cert to the /var/lib/hudson/.subversion/servers file. See https://wiki.svnkit.com/SVNKit_specific_system_properties and http://svnbook.red-bean.com/en/1.5/svn.advanced.confarea.html#svn.advanced.confarea.opts.servers
CoverosGene