使用带有自签名 SSL 证书的 Apache Ripple 模拟器
Using the Apache Ripple emulator with a self signed SSL certificate
我在使用 Cordova 5.1.1 和 Apache Ripple 0.9.32 时遇到问题。我正在尝试使用 IIS Express 和自签名 SSL 证书在 Visual Studio 2013 中调试连接到 C# Web API 2 Web 服务 运行。
Ripple,在 http://localhost:4400 的默认代理上 运行,报告
INFO: Proxying cross origin XMLHttpRequest - https://localhost:44300/api/account/login
ERROR: Proxying failed with: [Error: UNABLE_TO_VERIFY_LEAF_SIGNATURE]
当我在没有 SSL 的情况下调试 Web 服务时,一切正常。
任何人都可以阐明这一点,或者我需要从权威机构获得 SSL 证书吗?
我知道这可能与 有关。
也许是一个配置选项?来自 rippled.cfg:
/* If ssl_verify is 1, certificates will be validated
Use this if you have a certificate issued by a Certificate Authority
To allow the use of self-signed certificates for development or internal use,
set this to ssl_verify to 0. */
[ssl_verify]
1
我想出了一个目前已经足够好的解决方法。
- 创建 运行 Chrome 的快捷方式并设置 --disable-web-security 标志。有关更多信息,请参阅我在
的回答
- 使用命令行或Visual Studio
启动Ripple
- 使用 1.
中的快捷方式启动 Chrome 的实例
- 浏览到您的 Ripple url 并通过 HTTPS 发出您的请求
- 这将失败,开发工具控制台将显示 POST https://mydomain:port/api_endpoint net::ERR_INSECURE_RESPONSE
- 在新标签页中浏览到您的 https://mydomain:port url
- 这将生成一个 "Your connection is not private" 网页。单击 "Advanced",然后单击 "Proceed to https://mydomain:port (unsafe)" 接受自签名 SSL
- 现在回到 Ripple 选项卡,尝试再次发出您的请求,应该会成功。
我在使用 Cordova 5.1.1 和 Apache Ripple 0.9.32 时遇到问题。我正在尝试使用 IIS Express 和自签名 SSL 证书在 Visual Studio 2013 中调试连接到 C# Web API 2 Web 服务 运行。
Ripple,在 http://localhost:4400 的默认代理上 运行,报告
INFO: Proxying cross origin XMLHttpRequest - https://localhost:44300/api/account/login
ERROR: Proxying failed with: [Error: UNABLE_TO_VERIFY_LEAF_SIGNATURE]
当我在没有 SSL 的情况下调试 Web 服务时,一切正常。
任何人都可以阐明这一点,或者我需要从权威机构获得 SSL 证书吗?
我知道这可能与 有关。
也许是一个配置选项?来自 rippled.cfg:
/* If ssl_verify is 1, certificates will be validated
Use this if you have a certificate issued by a Certificate Authority
To allow the use of self-signed certificates for development or internal use,
set this to ssl_verify to 0. */
[ssl_verify]
1
我想出了一个目前已经足够好的解决方法。
- 创建 运行 Chrome 的快捷方式并设置 --disable-web-security 标志。有关更多信息,请参阅我在
- 使用命令行或Visual Studio 启动Ripple
- 使用 1. 中的快捷方式启动 Chrome 的实例
- 浏览到您的 Ripple url 并通过 HTTPS 发出您的请求
- 这将失败,开发工具控制台将显示 POST https://mydomain:port/api_endpoint net::ERR_INSECURE_RESPONSE
- 在新标签页中浏览到您的 https://mydomain:port url
- 这将生成一个 "Your connection is not private" 网页。单击 "Advanced",然后单击 "Proceed to https://mydomain:port (unsafe)" 接受自签名 SSL
- 现在回到 Ripple 选项卡,尝试再次发出您的请求,应该会成功。