Cordova是否支持在iOS上鎖定證書?Cordova是否支持在iOS上鎖定證書?
2
A
回答
1
Cordova不支持證書鎖定,但可以使用Intel App Security API作爲Cordova plugin來實現。
安全傳輸與固定公鑰發送片段:該片段的
// TODO change server PK
var publicKey = "-----BEGIN PUBLIC KEY-----\n" +
"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2swYYzD99BcjGlZ+W988\n" +
"bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjoBbdqfnGk5sRgprDv\n" +
"gOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDviS2Aelet8u5f\n" +
"a9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU1XupGc1V3sjs\n" +
"0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+bw8HHa8sHo9g\n" +
"OeL6NlMTOdReJivbPagUvTLrGAMoUgRx5aszPeE4uwc2hGKceeoWMPRfwCvocWvk\n" +
"+QIDAQAB\n" +
"-----END PUBLIC KEY-----\n";
// create the Transport Secure instance
intel.security.secureTransport.open({url: "https://software.intel.com/en-us/app-security-api/api", serverKey: publicKey})
// send the request
.then (function (transportInstanceID) {
// send the HTTPS request
return intel.security.secureTransport.sendRequest({instanceID: transportInstanceID, requestBody: "data to send"});
})
// process the response
.then (function(response) {
// assign response HTTP status
var responseHttpStatus = response.responseHttpStatus;
// assign response body
var responseBody = response.responseBody;
// assign response header
var responseHeader = response.responseHeader;
// now we have the following items:
// the response status in 'responseHttpStatus'
// the response body in 'responseBody'
// the response header in 'responseHeader'
// we can use those in our code.
doSomethingAfterReceiveWithKeyPinning(response);
})
.catch (function(error) {
console.log("Fail, error code is: " + error.code + ", error message is: " + error.message);
});
1
科爾多瓦沒有,但像大多數功能一樣,可以使用插件。
「用於與HTTP服務器通信的Cordova/Phonegap插件允許SSL固定!」 - https://github.com/wymsee/cordova-HTTP
就像他在Cordova Security Guide中所說的那樣,「......假設你的應用能夠使用插件完成所有的網絡請求(即:沒有傳統的XHR/AJAX請求等)。」
相關問題
- 1. Firebase是否支持證書鎖定?
- 2. SoapUI是否支持PKI /證書認證?
- 3. 證書鎖定在Android上
- 4. AL.exe是否支持X.509證書
- 5. GridGain是否支持分佈式鎖定?
- 6. TFS 2010是否支持樂觀鎖定?
- 7. iOS中的證書鎖定失敗
- 8. phonegap和cordova是否支持ARIA角色?
- 9. Trigger.io是否支持iOS上的Game Center?
- 10. haproxy是否支持用於客戶端證書驗證的OCSP
- 11. Qt是否支持iOS?
- 12. iOS 4.3是否支持ARC
- 13. iOS是否支持RTMPT?
- 14. cordova-plugin-whitelist在Android上工作但不支持iOS(Phonegap Build)
- 15. 與Robospice Android上的證書鎖定
- 16. 在iOS上查找證書
- 17. 動態證書鎖定
- 18. Windows Phone 8.0證書鎖定
- 19. iOS SSL使用AFNetworking在沒有證書的情況下鎖定?
- 20. Android是否支持鎖定到完全替換的界面?
- 21. iOS日曆是否支持URL方案?
- 22. iOS - AVFoundation是否支持3D條形碼?
- 23. AVPlayer是否支持iOS中的webm URL?
- 24. xamarin是否支持iOS的coreBluetooth?
- 25. iOS是否支持TLS壓縮?
- 26. iOS是否支持時間分片?
- 27. GCM是否支持iOS PushKit框架?
- 28. pthreads是否支持查詢遞歸互斥鎖的「鎖計數」?
- 29. 頁面可見性API實際上是否支持OS屏幕鎖定?
- 30. Apache在Windows上是否支持PHPIniDir?