MobileFirst 7.1.0.00.20170505-1403 - NSURLErrorDomain错误-1012。通过iPhone固定证书

时间:2018-01-19 03:00:09

标签: certificate ibm-mobilefirst mobilefirst-server pinning

我遵循此Article来实现混合应用程序的证书固定。该解决方案适用于Android,但我看到iPhone的以下问题。

err: {"responseHeaders":{},"status":0,"responseText":"","errorCode":"UNEXPECTED_ERROR","errorMsg":"The operation couldn’t be completed. (NSURLErrorDomain error -1012.)","invocationContext":null} 

我完全按照文章中的说明实现了。我使用了此代码示例here

中提到的.der格式
 // This API method must be called before any request attempt.
    WL.Client.pinTrustedCertificatePublicKey('MyCert.der').then(successfulPinning,failedPinning);
}

//Enable the buttons that send a request.
function successfulPinning() {
     WL.Logger.error("Certificate pinned");
}

function failedPinning() {
     WL.Logger.error("Certificate not pinned");
}

0 个答案:

没有答案