java.security.cert.CertificateException: Certificates does not conform to algorithm constraints

后端 未结 9 1543
难免孤独
难免孤独 2020-11-30 02:59

I have a mapping application that can add ArcGIS 9.3+ base maps given a URL. One of the URLs that I would like to add is from a customer\'s URL and is secured. My

相关标签:
9条回答
  • 2020-11-30 03:38

    We have this problem with one database we don't control and it requried another solution (The ones listed here didn't work). For mine I needed:

    -Djdk.tls.client.protocols="TLSv1,TLSv1.1"
    

    I think in my case it had to do with forcing a certain order.

    0 讨论(0)
  • 2020-11-30 03:38

    this is more likely happening because somewhere along your certificate chain you have a certificate, more likely an old root, which is still signed with the MD2RSA algorythm.

    You need to locate it into your certificate store and delete it.

    Then get back to your certification authority and ask them for then new root.

    It will more likely be the same root with the same validity period but it has been recertified with SHA1RSA.

    Hope this help.

    0 讨论(0)
  • 2020-11-30 03:48

    Eclipse failed to connect to SVN https repositories (should also apply to any app using SSL/TLS).

    svn: E175002: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Certificates does not conform to algorithm constraints

    The issue was caused by latest Java 8 OpenJDK update that disabled MD5 related algorithms. As a workaround until new certificates are issued (if ever), change the following keys at java.security file

    WARNING
    Keep in mind that this could have security implications as disabled algorithms are considered weak. As an alternative, the workaround can be applied on a JVM basis by a command line option to use an external java.security file with this changes, e.g.:
    java -Djava.security.properties=/etc/sysconfig/noMD5.java.security
    For Eclipse, add a line on eclipse.ini below -vmargs
    -Djava.security.properties=/etc/sysconfig/noMD5.java.security

    original keys

    jdk.certpath.disabledAlgorithms=MD2, MD5, RSA keySize < 1024
    jdk.tls.disabledAlgorithms=SSLv3, RC4, MD5withRSA, DH keySize < 768
    

    change to

    jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024
    jdk.tls.disabledAlgorithms=SSLv3, RC4, DH keySize < 768
    

    java.security file is located in linux 64 at /usr/lib64/jvm/java/jre/lib/security/java.security

    0 讨论(0)
  • 2020-11-30 03:48

    colleagues.

    I have faced with this trouble during a development of automation tests for our REST API. JDK 7_80 was installed at my machine only. Before I installed JDK 8, everything worked just fine and I had a possibility to obtain OAuth 2.0 tokens with a JMeter. After I installed JDK 8, the nightmare with Certificates does not conform to algorithm constraints began.

    Both JMeter and Serenity did not have a possibility to obtain a token. JMeter uses the JDK library to make the request. The library just raises an exception when the library call is made to connect to endpoints that use it, ignoring the request.

    The next thing was to comment all the lines dedicated to disabledAlgorithms in ALL java.security files.

    C:\Java\jre7\lib\security\java.security
    C:\Java\jre8\lib\security\java.security
    C:\Java\jdk8\jre\lib\security\java.security
    C:\Java\jdk7\jre\lib\security\java.security
    

    Then it started to work at last. I know, that's a brute force approach, but it was the most simple way to fix it.

    # jdk.tls.disabledAlgorithms=SSLv3, RC4, MD5withRSA, DH keySize < 768
    # jdk.certpath.disabledAlgorithms=MD2, MD5, RSA keySize < 1024
    
    0 讨论(0)
  • 2020-11-30 03:48

    Using openjdk-7 inside docker I have mounted a file with the content https://gist.github.com/dtelaroli/7d0831b1d5acc94c80209a5feb4e8f1c#file-jdk-security

    #Location to mount
    /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/security/java.security
    

    Thanks @luis-muñoz

    0 讨论(0)
  • 2020-11-30 03:51

    On Fedora 28, just pay attention to the line

    security.useSystemPropertiesFile=true

    of the java.security file, found at:

    $(dirname $(readlink -f $(which java)))/../lib/security/java.security

    Fedora 28 introduced external file of disabledAlgorithms control at

    /etc/crypto-policies/back-ends/java.config

    You can edit this external file or you can exclude it from java.security by setting

    security.useSystemPropertiesFile=false

    0 讨论(0)
提交回复
热议问题