Firebug 报告 SHA-1 证书错误

信息安全 证书
2021-09-07 06:11:07

对于本文底部的脚本,Firebug 报告以下错误:

本网站使用 SHA-1 证书;建议您使用具有签名算法的证书,该算法使用比 SHA-1 更强的哈希函数

每次调用 googleapis 都会重复该错误,并且确实会出现在我的服务器上的资源链接(即 clicks.js)中。

https://www.ssllabs.com表示我正在使用 SHA256withRSA。

oppenssl 也表明我正在使用 sha256WithRSAEncryption。

[root@devserver ~]# openssl req -in /etc/pki/tls/private/mysite_csr.pem -noout -text
Certificate Request:
    Data:
        Version: 0 (0x0)
        Subject: C=US, ST=Washington, L=Bothell, O=MySite, CN=mysite.com/emailAddress=xxx@comcastdotnet
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (3072 bit)
                Modulus:
                    xxxx
                Exponent: 65537 (0x10001)
        Attributes:
            a0:00
    Signature Algorithm: sha256WithRSAEncryption
         xxxx
[root@devserver ~]#

它发生在自签名证书以及来自 CA 的证书中。

下面是导致错误的脚本以及 Firebug 错误。

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>Testing</title>  
        <link href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/ui-lightness/jquery-ui.css" type="text/css" rel="stylesheet" />
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.js" type="text/javascript"></script>
        <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.js" type="text/javascript"></script>
        <script src="clicks.js" type="text/javascript"></script>
    </head>

    <body>
    </body> 
</html> 

在此处输入图像描述

左键单击以复制错误提供以下内容:

This site makes use of a SHA-1 Certificate; it's recommended you use certificates with signature algorithms that use hash functions stronger than SHA-1.
https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/ui-lightness/jquery-ui.css
Line 0

This site makes use of a SHA-1 Certificate; it's recommended you use certificates with signature algorithms that use hash functions stronger than SHA-1.
https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.js
Line 0

This site makes use of a SHA-1 Certificate; it's recommended you use certificates with signature algorithms that use hash functions stronger than SHA-1.
https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.js
Line 0

是什么导致了这个错误,它是如何消除的?

1个回答

问题不是的证书,而是googleapis.com您通过加载他们的 jQuery 库来访问的证书。

如果您直接进入其中一个脚本,您可以单击挂锁图标并查看有关 SSL 证书的更多信息:

+- GeoTrust Global CA
+--- Google Internet Authority G2
+----- *.storage.googleapis.com
     +--- Certificate Signature Algorithm: PCKS #1 SHA-1 With RSA Encryption

我不会太担心——谷歌希望尽快推进到 SHA256,它几乎不可能影响到你。

如果您真的很担心,请将 jQuery 的副本移动到本地站点,然后从那里包含它们。这样您就不会从 3rd 方主机获取资源。