简体   繁体   English

ionic 3 / node.js - 证书链中的自签名证书(如何禁用strict-ssl?)

[英]ionic 3 / node.js - Self signed certificate in certificate chain (how to disable strict-ssl?)

I cannot create a ionic project with ionic start because of following error: 由于以下错误,我无法使用ionic start创建离子项目:

Error: self signed certificate in certificate chain
    at TLSSocket.<anonymous> (_tls_wrap.js:1103:38)
    at emitNone (events.js:106:13)
    at TLSSocket.emit (events.js:208:7)
    at TLSSocket._finishInit (_tls_wrap.js:637:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:467:38)

on cmd: ionic start myApp tabs 在cmd: ionic start myApp tabs

Because our proxy sends a self-signed signature for all sites. 因为我们的代理会为所有网站发送自签名签名。 (FortiGate of FortiNet) (FortiNet的FortiGate)

In npm I set strict-ssl to false and works fine. 在npm我将strict-ssl设置为false并且工作正常。 But ionic loads the content over a node application, right? 但离子加载节点应用程序上的内容,对吗?

How to setup node to ignore self signed certificates for all node applications or how to disable it for ionic? 如何设置节点忽略所有节点应用程序的自签名证书或如何禁用离子?

ionic info

   @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0

System:

    Node : v8.9.1
    npm  : 5.5.1
    OS   : Windows 10

Misc:

    backend : legacy

我使用以下方法解决了问题

set NODE_TLS_REJECT_UNAUTHORIZED=0

Setting set NODE_TLS_REJECT_UNAUTHORIZED=0 comes at a great risk to the security of your application. 设置set NODE_TLS_REJECT_UNAUTHORIZED=0应用程序的安全性带来很大的风险。 I would recommend avoiding this "work around" for production software. 我建议避免为生产软件“解决”这个问题。 I recommend reading this before disabling. 我建议在禁用之前阅读此内容。

I'm still trying to fix my own issue and will update if I come up with a safer solution. 我仍在尝试解决自己的问题,如果我想出一个更安全的解决方案,我会更新。

我通过禁用我的防病毒软件来修复它。

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

相关问题 node.js elasticsearch 证书链中的自签名证书 - node.js elasticsearch self signed certificate in certificate chain 证书链中的自签名证书将node.js SDK用于Watson Assistant时出错 - Self signed certificate in certificate chain Error while using node.js SDK for watson assistant Node.js 依赖项安装提供“证书链中的自签名证书” - Node.js dependency installation giving "self signed certificate in certificate chain" 节点JS REST调用错误:证书链中的自签名证书 - Node JS REST call Error: self signed certificate in certificate chain 无法使用 Kubernetes 上的 Node.Js 连接到 Elasticsearch(证书链中的自签名证书) - Can't connect to Elasticsearch with Node.Js on Kubernetes (self signed certificate in certificate chain) 错误:node.js 申请中证书链中的自签名证书 - Error: self signed certificate in certificate chain in node js application 使用 https.request 忽略 node.js 中无效的自签名 ssl 证书? - Ignore invalid self-signed ssl certificate in node.js with https.request? 证书链中的自签名证书 - Self signed certificate in certificate chain 带有自签名证书的节点JS SSL固定。 - Node JS SSL pinning with self signed certificate. 在Node.JS中带有自签名证书的HTTPS代理 - HTTPS proxy with a self-signed certificate in Node.JS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM