linux svn 不支持 ssl,Linux下访问visualSVN时SSL校验失败问题解决办法

当使用Subversion客户端连接到运行在Linux上的VisualSVN Server并遇到SSL握手失败错误时,可能是因为服务器使用了自签名证书且客户端基于GnuTLS库。为了解决这个问题,可以通过修改Windows注册表来创建一个GnuTLS兼容的证书,或者在生产环境中使用由权威证书颁发机构签发的证书。具体操作包括在注册表中添加特定键值,然后通过VisualSVN Server Manager更新证书设置。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Linux下访问visualSVN时SSL校验失败问题解决办法

Symptoms

Subversion clients receive the following error message when attempting to connect to VisualSVN Server:

svn: OPTIONS of 'https://server.domain.local/svn/repo': SSL handshake failed: SSL error:

Key usage violation in certificate has been detected. (https://server.domain.local)

You may experience the issue if both of the following conditions are met:

?VisualSVN Server has a self-signed certificate applied and

?Subversion client is built against the GnuTLS library.

fc42f808b54f8d229f9598dfe4e2c292.png

Note GnuTLS library is an alternative to OpenSSL. Most Subversion clients for Windows are built against OpenSSL and are not affected by this issue. While some Subversion packages (available mostly on Linux-based operating systems such as Ubuntu and Debian) are built against GnuTLS and are affected.

Technical background

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.

Workaround

It's not recommended to use a self-signed certificate in a production environment. We advise to use a certificate issued by your domain or a third-party certificate authority instead of a

self-signed one.

If you have to use a self-signed certificate please follow the instruction to generate a cerificate without specifying 'Key Usage' extension:

1. Add the following registry value to the Windows registry:

1. for 32-bit system:

[HKEY_LOCAL_MACHINE\SOFTWARE\VisualSVN\VisualSVN Server]

"CreateGnuTLSCompatibleCertificate"=dword:00000001

2. for 64-bit system:

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\VisualSVN\VisualSVN

Server] "CreateGnuTLSCompatibleCertificate"=dword:00000001

Start VisualSVN Server Manager.

Go to Action | Properties | Certificate.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值