react-native-ssl-pinning
react-native-ssl-pinning copied to clipboard
The certificate for this server is invalid.
I am getting The certificate for this server is invalid. error when creating request on iOS
It is working fine for android but not working in iOS
my body is just like docs
fetch("https://publicobject.com", {
method: "GET" ,
timeoutInterval: 10000, // milliseconds
// your certificates array (needed only in android) ios will pick it automatically
pkPinning: true,
sslPinning: {
certs: ["sha256//r8udi/Mxd6pLO7y7hZyUMWq8YnFnIWXCqeHsTDRqy8=",
"sha256/YLh1dUR9y6Kja30RrAn7JKnbQG/uEtLMkBgFF2Fuihg="
]
},
headers: {
Accept: "application/json; charset=utf-8", "Access-Control-Allow-Origin": "*", "e_platform": "mobile",
}
})
if we are using public key pinning then too we need to add the .cer file to xcode? Please help me solve this issue.
I'd try this: sslPinning: { certs: ['mycerfile'] // don't put an extension here. } Then drag and drop the .cer file into XCode.
Getting the same issue as mentioned above in iOS. Is there any extra configuration required for iOS?
No extra configuration is required for iOS. Be sure your project is checked in the popup after you drag it in your project. Remember it's not enough to have it exist in the file system, it needs to be specifically dragged in. Also, be sure eliminate the .cer extension in: certs: ['mycertfile']
Wouldn't generating the certs and dragging them in the project will be equivalent to certificate pinning. I want to use the public key pinning specification similar to android as it will allow having backup public keys for the server also. Is there any workaround for this?
Getting the same error. do I need to make sure that my project is checked in the popup after I drag the cert?
if we are going with the public key pinning approach, doesn't make sense drop the certificate inside the project, the public key hash should be enough, what i'm missing here? ios version doesn't seens to be a valid implementation for PkPinning
there's a solution for this problem? i'm getting the same issue
Getting the same issue as mentioned above in iOS. there's a solution for this problem?
i getting the same issue !!!
Public Key pinning doesn't seem to be supported on iOS.
Same issue here.....public key pinning is not working for ios.