Open ek018 opened 4 years ago
Hi @ek018 , Were you able to fix the issue, if yes, would you mind sharing the solution? Thanks
@MaxToyberman this is the same issue as #60 but there isnt any conculsive solution for the problem, is pkPinning mandatory for certificate pinning?
Make sure the certificate file use you are using is in binary format and ".cer" extension, the AFSecurity only supports binary format certificates and not plain text certificates. As both certificates could have an extension of .cer this is most likely the reason why it was failing, as it was in my case. To check if it is in binary format or not, just open the contents of the file, if it has words BEING KEY, END key then its plain text and the certificate can easily be converted to binary format using online tools or a command prompt command.
@shrynshjn Did you fix it with adding public keys?
Yes. @mkilp, the certificate should be in the proper format. The steps in documentation works fine, it just doesn't mention the format of the public certificate
Make sure it's a binary certificate with .cer extension
@shrynshjn Did you fix it with adding public keys?
adding public key pinning is not mandatory, only certificate pinning works, with the right certficate
Make sure the certificate file use you are using is in binary format and ".cer" extension, the AFSecurity only supports binary format certificates and not plain text certificates. As both certificates could have an extension of .cer this is most likely the reason why it was failing, as it was in my case. To check if it is in binary format or not, just open the contents of the file, if it has words BEING KEY, END key then its plain text and the certificate can easily be converted to binary format using online tools or a command prompt command.
You are a life saver
Hello @MaxToyberman ,
For these 2 weeks on IOS app always got crash from thread
[__NSArrayM insertObject:atIndex:]: object cannot be nil
Using this code was work on Android but always got crash on IOS, Could you elaborate how to solve this?Thanks,
Code
Setup
Error
Environment