“证书中的密钥使用违规” Subversion、VisualSVN 服务器出现错误
我在 Ubuntu 11.10 中使用 Eclipse (Indigo) 和 subclipse 3.6。
我之前在其他机器上用 subclipse 连接到 svn 没有问题,但是用我最近升级的 ubuntu 机器(从 11.04 到 11.10)它无法工作。
当我尝试连接到我的私有 svn 服务器(Windows 中的 VisualSVN 服务器)时,出现以下错误:
RA layer request failed
svn: OPTIONS of 'https://76.27.122.123/svn/brock':
SSL handshake failed: SSL error: Key usage violation in certificate has been detected. (https://76.27.122.123)
Key usage violation in certificate
因此,用 google 搜索,找到了这个解决方案: http://andrewbrobinson.com/2011/11/01/fixing-ssl-handshake-failed-ssl-error-key-usage-violation-in-certificate-has-been-Detected-error-on-svn -checkout/
这基本上是说因为 neon 现在使用 GnuTls,而且它很严格并拒绝我的无效证书(就像我说的那样)私有 svn,因此不受信任)。 但是,当我执行 mv 和符号链接命令时,它会弄乱我的 JavaHL 设置,并给出此错误:
Failed to load JavaHL Library.
These are the errors that were encountered:
no libsvnjavahl-1 in java.library.path ...
我撤消了 mv 命令,现在 JavaHL 在遵循我在此处找到的说明后正在工作 http://subclipse.tigris.org/wiki/JavaHL#head-5ccce53a67ca6c3965de863ae91e2642eab537de 但仍然无法解决密钥使用证书错误。有什么想法吗?
I'm using Eclipse (Indigo) with subclipse 3.6 in Ubuntu 11.10.
I've connected to the svn with subclipse on other machines before no problem, but with my recently upgraded ubuntu machine (went from 11.04 to 11.10) it won't work.
when I try to connect to my private svn server (VisualSVN Server in Windows), I get the following error:
RA layer request failed
svn: OPTIONS of 'https://76.27.122.123/svn/brock':
SSL handshake failed: SSL error: Key usage violation in certificate has been detected. (https://76.27.122.123)
Key usage violation in certificate
So, googled it, and found this solution: http://andrewbrobinson.com/2011/11/01/fixing-ssl-handshake-failed-ssl-error-key-usage-violation-in-certificate-has-been-detected-error-on-svn-checkout/
Which basically says that because neon is now using GnuTls, and it is being strict and rejecting my invalid certificate (like I said it's a private svn so it is untrusted).
But when I do the mv and symbolic link commands, it then messes up my JavaHL setup, and gives me this error:
Failed to load JavaHL Library.
These are the errors that were encountered:
no libsvnjavahl-1 in java.library.path ...
I undid the mv command and now the JavaHL is working after following instructions I found here http://subclipse.tigris.org/wiki/JavaHL#head-5ccce53a67ca6c3965de863ae91e2642eab537de but still can't get past the key usage certificate error. Any ideas??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在初始设置期间,VisualSVN Server 2.5 生成一个自签名证书并将其添加到本地计算机上的受信任的根证书颁发机构存储中。为了避免可能的安全问题,VisualSVN Server 使此自签名证书仅对服务器身份验证有效(通过指定“密钥用法”扩展)。
针对 GnuTLS 构建的 Subversion 客户端无法识别此类证书,因此会发生错误。
可能的解决方法:
During the initial setup VisualSVN Server 2.5 generates a self-signed certificate and adds it to the Trusted Root Certification Authorities store on the local machine. To avoid possible security issues, VisualSVN Server makes this self-signed certificate to be valid for server authentication only (by specifying the 'Key Usage' extension).
Subversion clients built against GnuTLS don't recognize such certificate and the error occurs.
Possible workarounds:
或者,您可以添加
到
.bashrc
中,这样只有svn
命令会受到 libneon 更改的影响,而不会影响其他软件包。另请注意,链接中提到的解决方案将在 Ubuntu 12.04 LTS 下崩溃。为此,您必须使用以下步骤:卸载当前的 libneon 软件包:
从 http: 下载最新的 libneon 软件包: //packages.debian.org/squeeze/libneon27(在底部您可以为您的架构选择正确的版本)。
安装所需的 libssl 依赖项:
安装下载的 libneon 软件包。例如对于 64 位架构:
<前><代码>dpkg -i libneon27_0.29.3-3_amd64.deb
添加
添加到您的
.bashrc
,然后重新登录。来源: http:// /www.yeap.de/blog2.0/archives/260-Subversion-Certificate-Problems-with-Ubuntu-Precise-Pangolin.html
Alternatively you might add
to your
.bashrc
, so only thesvn
command would be affected by the libneon change, and not the other packages. Also be careful that the solution mentioned in your link will break under Ubuntu 12.04 LTS. For that you have to use these steps:Uninstall the current libneon package:
Download the latest libneon package from http://packages.debian.org/squeeze/libneon27 (at the bottom you can choose the right version for your architecture).
Install the required libssl dependency:
Install the downloaded libneon package. E.g. for the 64Bit architecture:
Add
to your
.bashrc
, and relogin.Source: http://www.yeap.de/blog2.0/archives/260-Subversion-Certificate-Problems-with-Ubuntu-Precise-Pangolin.html