This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 195287 - Linux SVN client certificate support is broken
Summary: Linux SVN client certificate support is broken
Status: RESOLVED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Subversion (show other bugs)
Version: 6.x
Hardware: PC Linux
: P2 normal (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-10 12:39 UTC by mzsolt
Modified: 2011-02-10 17:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages.log stacktrace (2.30 KB, text/plain)
2011-02-10 12:39 UTC, mzsolt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mzsolt 2011-02-10 12:39:30 UTC
Created attachment 105835 [details]
messages.log stacktrace

Former Linux IDE versions (6.5, 6.7.1) had no such problem, so it seems to be some sort of problem with the new Keyring integration on Linux. I even installed GNOME, and got the keyring working (instead of the master password method) yet the IDE is not able to authenticate to an SVN server with an SSL client certificate that is password protected (P12 file):

org.tigris.subversion.svnclientadapter.SVNClientException: svn: OPTIONS of 'https://xxx': SSL negotiation failed: SSL error: sslv3 alert handshake failure (xxx)  - see the attached stacktrace.

The Windows 6.9.1 version is working, BUT only after manually copying the SVN configuration from the NetBeans 6.5 config folder to:
 .netbeans\6.9\config\svn\config@\

But on Linux it doesn't help, I suspect because of the Keyring/password encryption functionality. 

From the SVN server logs, it's obvious that NetBeans 6.9.1 on Linux sends no client certificate.

Manually invoking SVN client works fine after copying the setting to the NetBeans diretory (like on windows), so the SVN client util is working fine:

svn update . --config-dir /home/mzsolt/.netbeans/6.9/config/svn/config 
At revision 39.

Has anyone tried to use SVN SSL client certificate on the Linux version of the 6.9.1 IDE?
Comment 1 Ondrej Vrabec 2011-02-10 13:29:17 UTC
> The Windows 6.9.1 version is working, BUT only after manually copying the SVN
> configuration from the NetBeans 6.5 config folder to: .netbeans\6.9\config\svn\config
It's useless, since .netbeans\6.9\config\svn\config is deleted and recreated before each subversion command. It's a temporary file, do not modify it.
It should be working in general, another user experienced a similar problem, but after with a workaround was able to make it work: see bug #191498
Check the connection settings for the repository, is the path to cert entered correctly?
Comment 2 mzsolt 2011-02-10 13:50:45 UTC
(In reply to comment #1)
> It's useless, since .netbeans\6.9\config\svn\config is deleted and recreated
> before each subversion command. It's a temporary file, do not modify it.
> It should be working in general, another user experienced a similar problem,
> but after with a workaround was able to make it work: see bug #191498
> Check the connection settings for the repository, is the path to cert entered
> correctly?

I checked the path, password, etc. several times. I've using the previous versions this way for a long time, never had problem with is. Tried importing settings from different previous versions (6.5, 6.7.1) (all working with the same path, same cert). Tried clean start (deleting the whole 6.9 userdir) still I wasn't able to get the connection working.

It's suspicious that 6.9.1 didn't even prompt me whether I want to trust the CA of the server until I changed the SVN server to only OPTIONALLY request SSL client certificate (the default was to require) On previous NetBeans version it worked like a charm without server modification.
So it seems to me something is different in SSL handling of 6.9.1. 

It seems to be related to the certificate password handling of NB 6.9.1 Linux, beacuse the SVN, and Java versions are the same as with 6.5
To prove this, I repeated some tests now:  NB 6.9.1 on Linux gives the same error message when I type the certificate password incorrectly!

The user, in bug #191498 uses the Windows version. I got it working on Windows with 6.9.1.
I would like to ask you to please test the SVN SSL Client cert functionality in Linux, because the above mentioned differences all point to a bug that is real. At least the part that it gives the same error message in the case of good and bad certificate passwords (double checked)
Comment 3 Ondrej Vrabec 2011-02-10 14:27:24 UTC
Could you check one more thing? Look inside .netbeans\6.9.1\config\svn\config right after the connection fails. Is 'ssl-client-cert-file' and 'ssl-client-cert-password' correctly set? Could you please mask the password and send me the file? It will take some time before i test it, i'll have to setup some server with cert auth.
Comment 4 Ondrej Vrabec 2011-02-10 16:02:33 UTC
Well, i've tried it and found out one thing. In 6.9.1 i am successfully able to connect to a repository using cert authentication, but *only* if "remember password" checkbox in the authentication dialog is checked. If i deselect it, the connection fails. This however is fixed in 7.0 (works fine in 7.0 beta). Otherwise i've had no problems connecting to the repo. Can this be your case, too?
Could you please try NB 7.0 beta? Thanks a lot.
BTW, i asked you for ~/.netbeans/..../config. I was mistaken, the correct file is 'servers' in the same folder.
Comment 5 mzsolt 2011-02-10 17:44:50 UTC
(In reply to comment #4)
> Well, i've tried it and found out one thing. In 6.9.1 i am successfully able to
> connect to a repository using cert authentication, but *only* if "remember
> password" checkbox in the authentication dialog is checked. If i deselect it,
> the connection fails. This however is fixed in 7.0 (works fine in 7.0 beta).
> Otherwise i've had no problems connecting to the repo. Can this be your case,
> too?
> Could you please try NB 7.0 beta? Thanks a lot.
> BTW, i asked you for ~/.netbeans/..../config. I was mistaken, the correct file
> is 'servers' in the same folder.

Thank you very much! Checking the "Save Username and Password" solves the problem, the connection is working alright. I totally 'connected' that checkbox to the username/password option in my mind and didn't give it a try...

After this I deleted the whole userdir and checked the 'servers' file you asked: until I checked the above checkbox it only contained a single line: [global] and gave the same error.

After checking it the file was appended with the ssl-client-cert-file, and password lines, and it's working alright!

Thank you very much for the solution again!
Comment 6 mzsolt 2011-02-10 17:56:57 UTC
> (In reply to comment #4)
> > Could you please try NB 7.0 beta? Thanks a lot.

I checked the NB 7.0 beta, it's working alright by default, without the need for setting the checkbox.