zoukankan      html  css  js  c++  java
  • SSL handshake failed: SSL 错误:在证书中检测到违规的密钥用法。

    问题:在WINDOWS中创建的SVN Server,在Linux client中无法连接。
    原因:WINDOWS中的证书无法被Linux正确识别,因此需要修改证书,以使双方都可以正确识别。

    修改方法如下:(在网上搜到的解决办法,特放在这里以备忘。)

    http://www.visualsvn.com/support/topic/00056/

    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.

    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:
    for 32-bit system:
    [HKEY_LOCAL_MACHINESOFTWAREVisualSVNVisualSVN Server]
    "CreateGnuTLSCompatibleCertificate"=dword:00000001
         
    for 64-bit system:
    [HKEY_LOCAL_MACHINESOFTWAREWow6432NodeVisualSVNVisualSVN Server]
    "CreateGnuTLSCompatibleCertificate"=dword:00000001
         
    2、Start VisualSVN Server Manager.
    3、Go to Action | Properties | Certificate.
    4、Click Change certificate... and follow the wizard instructions to generate a new self-signed certificate.
    The certificate will be generated without the 'Key Usage' extension and will be compatible both with GnuTLS and OpenSSL.

  • 相关阅读:
    BZOJ.3990.[SDOI2015]排序(DFS)
    BZOJ.1040.[ZJOI2008]骑士(树形DP)
    BZOJ.2246.[SDOI2011]迷宫探险(DP 记忆化搜索 概率)
    BZOJ.3209.花神的数论题(数位DP)
    UVA.1640.The Counting Problem / BZOJ.1833.[ZJOI2010]数字计数(数位DP)
    HDU.3652.B-number(数位DP)
    BZOJ.4514.[SDOI2016]数字配对(费用流SPFA 二分图)
    BZOJ.4832.[Lydsy1704月赛]抵制克苏恩(期望DP)
    BZOJ.1025.[SCOI2009]游戏(背包DP)
    BZOJ.3257.树的难题(树形DP)
  • 原文地址:https://www.cnblogs.com/swblog/p/3296132.html
Copyright © 2011-2022 走看看