简体   繁体   English

Firefox和SSL:sec_error_unknown_issuer

[英]Firefox and SSL: sec_error_unknown_issuer

My client gets a sec_error_unknown_issuer error message when visiting https://mediant.ipmail.nl with Firefox. 使用Firefox访问https://mediant.ipmail.nl时,我的客户端收到sec_error_unknown_issuer错误消息。 I can't reproduce the error myself. 我自己无法重现错误。 I installed FF on a Vista and a XP machine and had no problems. 我在Vista和XP机器上安装了FF,没有任何问题。 FF on Ubuntu also works fine. Ubuntu上的FF也运行正常。

Does anyone get the same error and does anyone have some clues for me so I can tell my ISP to change some settings? 有没有人得到相同的错误,有没有人有一些线索,所以我可以告诉我的ISP更改一些设置? The certificate is a so called wild-card SSL certificate that works for all subdomains (*.ipmail.nl). 证书是一种所谓的通配符SSL证书,适用于所有子域(* .ipmail.nl)。 Was I wrong to pick the cheapest one? 选错最便宜的是我错了吗?

Just had the same problem with a Comodo Wildcard SSL cert. 刚刚遇到Comodo Wildcard SSL证书的问题。 After reading the docs the solution is to ensure you include the certificate chain file they send you in your config ie 阅读文档后,解决方案是确保您在配置中包含他们发送给您的证书链文件,即

SSLCertificateChainFile /etc/ssl/crt/yourSERVERNAME.ca-bundle

Full details on Comodo site 关于Comodo网站的详细信息

We had this problem and it was very much Firefox specific -- could only repro in that browser, Safari, IE8, Chrome, etc were all fine. 我们遇到了这个问题,它非常适合Firefox - 只能在浏览器中重复,Safari,IE8,Chrome等都可以。

Fixing it required getting an updated cert from Comodo and installing it. 修复它需要从Comodo获取更新的证书并进行安装。

No idea what magic they changed, but it was definitely something in the cert that Firefox did NOT like. 不知道他们改变了什么魔法,但它绝对是Firefox不喜欢的证书。

For nginx do this Generate a chained crt file using 对于nginx,请执行此操作使用生成链式crt文件

$ cat www.example.com.crt bundle.crt > www.example.com.chained.crt

The resulting file should be used in the ssl_certificate directive: 生成的文件应该在ssl_certificate指令中使用:

server {
    listen              443 ssl;
    server_name         www.example.com;
    ssl_certificate     www.example.com.chained.crt;
    ssl_certificate_key www.example.com.key;
    ...
}

Firefox is more stringent than other browsers and will require proper installation of an intermediate server certificate. Firefox比其他浏览器更严格,需要正确安装中间服务器证书。 This can be supplied by the cert authority the certificate was purchased from. 这可以由购买证书的证书颁发机构提供。 the intermediate cert is typically installed in the same location as the server cert and requires the proper entry in the httpd.conf file. 中间证书通常安装在与服务器证书相同的位置,并且需要在httpd.conf文件中正确输入。

while many are chastising Firefox for it's (generally) exclusive 'flagging' of this, it's actually demonstrating a higher level of security standards. 虽然许多人正在惩罚Firefox,因为它(通常)独家“标记”了这一点,但它实际上证明了更高级别的安全标准。

I know this thread is a little old but we ran into this too and will archive our eventual solution here for others. 我知道这个帖子有点旧,但我们也遇到了这个问题,并将这里的最终解决方案归档给其他人。

We had the same problem with a Comodo wildcard "positive ssl" cert. 我们在Comodo通配符“积极的ssl”证书上遇到了同样的问题。 We are running our website using a squid-reverse SSL proxy and Firefox would keep complaining "sec_error_unknown_issuer" as you stated, yet every other browser was OK. 我们使用squid-reverse SSL代理运行我们的网站,Firefox会像你说的那样抱怨“sec_error_unknown_issuer”,但其他所有浏览器都没问题。

I found that this is a problem of the certificate chain being incomplete. 我发现这是证书链不完整的问题。 Firefox apparently does not have one of the intermediary certificates build in, though Firefox does trust the root CA. 虽然Firefox确实信任根CA,但Firefox显然没有内置的中间证书之一。 Therefore you have to provide the whole chain of certificates to Firefox. 因此,您必须向Firefox提供整个证书链。 Comodo's support states: Comodo的支持指出:

An intermediate certificate is the certificate, or certificates, that go between your site (server) certificate and a root certificate. 中间证书是在您的站点(服务器)证书和根证书之间的证书或证书。 The intermediate certificate, or certificates, completes the chain to a root certificate trusted by the browser. 中间证书或证书将链完成到浏览器信任的根证书。

Using an intermediate certificate means that you must complete an additional step in the installation process to enable your site certificate to be chained to the trusted root, and not show errors in the browser when someone visits your web site. 使用中间证书意味着您必须在安装过程中完成一个额外步骤,以便将站点证书链接到受信任的根目录,并在有人访问您的网站时不在浏览器中显示错误。

This was already touched on earlier in this thread but it did not resove how you do this. 这个帖子早些时候已经触及了这个问题,但它没有重新解决你这样做的方法。

First you have to make a chained certificate bundle and you do that by using your favorite text editor and just paste them in, in the correct (reverse) order ie 首先,您必须创建一个链式证书包,然后使用您喜欢的文本编辑器并按正确(反向)顺序粘贴它们,即

  • Intermediate CA Certificate 2 - IntermediateCA2.crt - on top of the file 中级CA证书2 - IntermediateCA2.crt - 位于文件之上
  • Intermediate CA Certificate 1 - IntermediateCA1.crt 中级CA证书1 - IntermediateCA1.crt
  • Root CA Certificate - root.crt - at the end of the file 根CA证书 - root.crt - 位于文件末尾

The exact order you can get from your ssl provider if its not obvious from the names. 如果从名称中不明显,您可以从ssl提供程序获得确切的顺序。

Then save the file as whatever name you like. 然后将文件保存为您喜欢的任何名称。 Eg yourdomain-chain-bundle.crt 例如yourdomain-chain-bundle.crt

In this example I have not included the actual domain certificate and as long as your server can be configured to take a separate chained certificate bundle this is what you use. 在此示例中,我没有包含实际的域证书,只要您的服务器可以配置为采用单独的链式证书包,这就是您使用的。

More data can be found here: 更多数据可以在这里找到:

https://support.comodo.com/index.php?/Knowledgebase/Article/View/643/0/how-do-i-make-my-own-bundle-file-from-crt-files https://support.comodo.com/index.php?/Knowledgebase/Article/View/643/0/how-do-i-make-my-own-bundle-file-from-crt-files

If for some reason you can't configure your server to use a separate chained bundle, then you just paste your server certificate in the beginning (on the top) of the bundle and use the resulting file as your server cert. 如果由于某种原因您无法将服务器配置为使用单独的链式捆绑包,那么只需将服务器证书粘贴到捆绑包的开头(顶部),然后将生成的文件用作服务器证书。 This is what needs to be done in the Eg Squid case. 这是需要在Eg Squid案例中完成的工作。 See below from the squid mailing list on this subject. 请参阅下面关于此主题的squid邮件列表。

http://www.squid-cache.org/mail-archive/squid-users/201109/0037.html http://www.squid-cache.org/mail-archive/squid-users/201109/0037.html

This resolved it for us. 这为我们解决了这个问题。

I had this problem with Firefox and my server. 我和Firefox以及我的服务器有这个问题。 I contacted GoDaddy customer support, and they had me install the intermediate server certificate: 我联系了GoDaddy的客户支持,他们让我安装了中间服务器证书:

http://support.godaddy.com/help/article/868/what-is-an-intermediate-certificate http://support.godaddy.com/help/article/868/what-is-an-intermediate-certificate

After a re-start of the World Wide Web Publishing Service, everything worked perfectly. 重新启动万维网发布服务后,一切都运行良好。

If you do not have full access to your server, your ISP will have to do this for you. 如果您无法完全访问您的服务器,则您的ISP必须为您执行此操作。

Which version of Firefox on which platform is your client using? 您的客户端使用哪个版本的Firefox?

The are people having the same problem as documented here in the Support Forum for Firefox . 人们遇到的问题与Firefox支持论坛中记录的问题相同。 I hope you can find a solution there. 我希望你能在那里找到解决方案。 Good luck! 祝好运!

Update: 更新:

Let your client check the settings in Firefox: On "Advanced" - "Encryption" there is a button "View Certificates". 让您的客户端检查Firefox中的设置:在“高级” - “加密”上有一个“查看证书”按钮。 Look for "Comodo CA Limited" in the list. 在列表中查找“Comodo CA Limited” I saw that Comodo is the issuer of the certificate of that domain name/server. 我看到Comodo是该域名/服务器证书的发行者。 On two of my machines (FF 3.0.3 on Vista and Mac) the entry is in the list (by default/Mozilla). 在我的两台机器上(Vista和Mac上的FF 3.0.3),该条目位于列表中(默认情况下为/ Mozilla)。

替代文字

As @user126810 said, the problem can be fixed with a proper SSLCertificateChainFile directive in the config file. 正如@ user126810所说,问题可以通过配置文件中适当的SSLCertificateChainFile指令来解决。

But after fixing the config and restarting the webserver, I also had to restart Firefox . 但在修复配置并重新启动网络服务器之后,我还必须重新启动Firefox Without that, Firefox continued to complain about bad certificate (looks like it used a cached one). 没有它,Firefox继续抱怨坏证书(看起来像是使用了缓存证书)。

如果您从COMODO获得了证书,则需要添加此行,该文件位于您收到的zip文件中。

SSLCertificateChainFile /path/COMODORSADomainValidationSecureServerCA.crt

June 2014: 2014年6月:

This is the configuration I used and it working fine after banging my head on the wall for some days. 这是我使用的配置,它在我的头撞墙几天后工作正常。 I use Express 3.4 (I think is the same for Express 4.0) 我使用Express 3.4(我认为Express 4.0是一样的)

var privateKey  = fs.readFileSync('helpers/sslcert/key.pem', 'utf8');
var certificate = fs.readFileSync('helpers/sslcert/csr.pem', 'utf8');

files = ["COMODORSADomainValidationSecureServerCA.crt",
         "COMODORSAAddTrustCA.crt",
         "AddTrustExternalCARoot.crt"
        ];

ca = (function() {
  var _i, _len, _results;

  _results = [];
  for (_i = 0, _len = files.length; _i < _len; _i++) {
    file = files[_i];
    _results.push(fs.readFileSync("helpers/sslcert/" + file));
  }
  return _results;
})();

var credentials = {ca:ca, key: privateKey, cert: certificate};

// process.env.PORT : Heroku Config environment
var port = process.env.PORT || 4000;

var app = express();
var server = http.createServer(app).listen(port, function() {
        console.log('Express HTTP server listening on port ' + server.address().port);
});
https.createServer(credentials, app).listen(3000, function() {
        console.log('Express HTTPS server listening on port ' + server.address().port);
});

// redirect all http requests to https
app.use(function(req, res, next) {
  if(!req.secure) {
    return res.redirect(['https://mydomain.com', req.url].join(''));
  }
  next();
});

Then I redirected the 80 and 443 ports: 然后我重定向了80和443端口:

sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 4000
sudo iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 3000

As you can see after checking my certifications I have 4 [0,1,2,3]: 检查我的认证后你会看到我有4 [0,1,2,3]:

openssl s_client -connect mydomain.com:443 -showcerts | openssl s_client -connect mydomain.com:443-showcerts | grep "^ " grep“^”

ubuntu@ip-172-31-5-134:~$ openssl s_client -connect mydomain.com:443 -showcerts | grep "^ "
depth=3 C = SE, O = AddTrust AB, OU = AddTrust External TTP Network, CN = AddTrust External CA Root
verify error:num=19:self signed certificate in certificate chain
verify return:0
 0 s:/OU=Domain Control Validated/OU=PositiveSSL/CN=mydomain.com
   i:/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA Domain Validation Secure Server CA
 1 s:/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA Domain Validation Secure Server CA
   i:/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA Certification Authority
 2 s:/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA Certification Authority
   i:/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root
 3 s:/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root
   i:/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root
    Protocol  : TLSv1.1
    Cipher    : AES256-SHA
    Session-ID: 8FDEAEE92ED20742.....3E7D80F93226142DD
    Session-ID-ctx:
    Master-Key: C9E4AB966E41A85EEB7....4D73C67088E1503C52A9353C8584E94
    Key-Arg   : None
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    TLS session ticket lifetime hint: 300 (seconds)
    TLS session ticket:
    0000 - 7c c8 36 80 95 4d 4c 47-d8 e3 ca 2e 70 a5 8f ac   |.6..MLG....p...
    0010 - 90 bd 4a 26 ef f7 d6 bc-4a b3 dd 8f f6 13 53 e9   ..J&..........S.
    0020 - f7 49 c6 48 44 26 8d ab-a8 72 29 c8 15 73 f5 79   .I.HD&.......s.y
    0030 - ca 79 6a ed f6 b1 7f 8a-d2 68 0a 52 03 c5 84 32   .yj........R...2
    0040 - be c5 c8 12 d8 f4 36 fa-28 4f 0e 00 eb d1 04 ce   ........(.......
    0050 - a7 2b d2 73 df a1 8b 83-23 a6 f7 ef 6e 9e c4 4c   .+.s...........L
    0060 - 50 22 60 e8 93 cc d8 ee-42 22 56 a7 10 7b db 1e   P"`.....B.V..{..
    0070 - 0a ad 4a 91 a4 68 7a b0-9e 34 01 ec b8 7b b2 2f   ..J......4...{./
    0080 - e8 33 f5 a9 48 11 36 f8-69 a6 7a a6 22 52 b1 da   .3..H...i....R..
    0090 - 51 18 ed c4 d9 3d c4 cc-5b d7 ff 92 4e 91 02 9e   .....=......N...
    Start Time: 140...549
    Timeout   : 300 (sec)
    Verify return code: 19 (self signed certificate in certificate chain)

Good luck! 祝好运! PD: if u want more answers please check: http://www.benjiegillam.com/2012/06/node-dot-js-ssl-certificate-chain/ PD:如果您想要更多答案,请查看: http//www.benjiegillam.com/2012/06/node-dot-js-ssl-certificate-chain/

如果其他人遇到Ubuntu LAMP和“COMODO Positive SSL”的问题,请尝试从压缩文件中的证书构建自己的捆绑包。

cat AddTrustExternalCARoot.crt COMODORSAAddTrustCA.crt COMODORSADomainValidationSecureServerCA.crt > YOURDOMAIN.ca-bundle

I've being going round in circles with Firefox 43, El Capitan and WHM/cPanel SSL installation continually getting the Untrusted site error - I didn't buy the certificate it was handed over to me to install as the last guy walked out the door. 我正在围绕Firefox 43,El Capitan和WHM / cPanel SSL安装不断获取不受信任的网站错误 - 我没有购买证书,因为最后一个人走出门,我将其交给我安装。 Turns out I was installing under the wrong domain because I missed off the www - but the certificate still installed against the domain, when I installed the certificate in WHM using www.domain.com.au it installed now worries and the FF error has gone - the certificate works fine for both www and non-www. 事实证明我在错误的域下安装,因为我错过了www - 但是证书仍然安装在域名上,当我使用www.domain.com.au安装WHM中的证书时,它现在安装担心并且FF错误消失了 - 证书适用于www和非www。

To answer the non-reproducability aspect of the question - Firefox automatically imports intermediate certificates into its certificate store. 要回答问题的不可重现性方面 - Firefox会自动将中间证书导入其证书存储区。 So if you've previously visited a site which has used the same Intermediate Certificate using a correctly configured certificate chain then Firefox will store that Certificate so you will not see the problem when you visit a site that has an incorrectly configured chain using the same Intermediate certificate. 因此,如果您之前访问过使用正确配置的证书链使用相同中间证书的站点,那么Firefox将存储该证书,这样当您访问使用相同中间件的链不正确的站点时,您将看不到问题证书。

You can check this in Firefox's Certificate Manager (Options->Privacy&Security->View Certificates...) where you can see all stored certificates. 您可以在Firefox的证书管理器(选项 - >隐私和安全 - >查看证书...)中查看,您可以在其中查看所有存储的证书。 Under the 'Security Device' Column you can check where a certificate has come from - automatically/manually imported certificates will appear as from 'Software Security Device' as opposed to the 'Builtin Object Token', which are the default set installed with Firefox. 在“安全设备”列下,您可以检查证书的来源 - 自动/手动导入的证书将显示为“软件安全设备”,而不是“内置对象令牌”,这是随Firefox安装的默认设置。 You can delete/Distrust any specific certificates and test again. 您可以删除/不信任任何特定证书并再次测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM