保存包含在 phonegap / cordova 应用程序分发中的证书
Save certificate included in phonegap / cordova app distribution
我需要让我的用户安装一个包含在我的 Phonegap 应用程序中的根 CA 证书(就像您包含图像或 javascript 文件一样)。我能够像标准嵌入图像一样 link 文件。例如:
<!-- this is an image included in the phonegap app -->
<img src="img/mylogo.png" />
<!-- this is the certificate also included in the phonegap app -->
<a href="cert/mycacert.cer">My Cert</a>
当我在 iOS 上打开应用程序并单击 link 到嵌入式证书时,没有任何反应。我的目标是让 iOS 提示安装证书。有更好的方法吗?
谢谢!
不幸的是我无法让它工作。我尝试使用资源的相对路径和普通香草 link 的 FileTransfer,两者都不起作用。
我最终将证书托管在受 SSL 保护的域上以供下载。对于下载,我使用 cordova-plugin-inappbrowser
和以下代码:
window.open('https://thesite.com/thecert.cer', '_server')
DL 启动并提示按预期安装。
我需要让我的用户安装一个包含在我的 Phonegap 应用程序中的根 CA 证书(就像您包含图像或 javascript 文件一样)。我能够像标准嵌入图像一样 link 文件。例如:
<!-- this is an image included in the phonegap app -->
<img src="img/mylogo.png" />
<!-- this is the certificate also included in the phonegap app -->
<a href="cert/mycacert.cer">My Cert</a>
当我在 iOS 上打开应用程序并单击 link 到嵌入式证书时,没有任何反应。我的目标是让 iOS 提示安装证书。有更好的方法吗?
谢谢!
不幸的是我无法让它工作。我尝试使用资源的相对路径和普通香草 link 的 FileTransfer,两者都不起作用。
我最终将证书托管在受 SSL 保护的域上以供下载。对于下载,我使用 cordova-plugin-inappbrowser
和以下代码:
window.open('https://thesite.com/thecert.cer', '_server')
DL 启动并提示按预期安装。