Open takhil opened 1 year ago
Hi @takhil, First, can you confirm thoses questions :
openssl x509 -inform der -in CERTIFICATE.cer -text -noout
must succeedIf yes ; What error do you have? -2? On both platform ? Is your certificate self-signed? I remember having an issue with this kind of certificate.
EDIT: I suppose that you inject correctly http service in your angular component and that the setServerTrustMode() returns success.
Kr.
Hi @TiBz0u ,
Thanks for the response and I see error -2 from mobile app when I tried inject the serverTrustMode() and I checked the certificate with the command and certificate looks good.
Can you think of anything else?
Hi @takhil,
The serverTrustMode()
method gives you only a success normally. It has to be done when your app starts. After that, if you respect what I explain above, it has to work.
Please double check the extension (.cer needed) and the format (must be DER et not PEM [base64]).
Otherwise, can you provide a public repository to check your configuration?
If you use a VPN, please make sure with the IT that the VPN doesn't encapsulate everything, it can be a problem too.
Kr.
Describe the bug We are getting an exception on both iOS and Android with our new certificate on the server. We checked the SSL-Certificate, everything looks fine, no errors. we tried adding default and trusted both case facing issue.
FYI certificate pinning use to work one year back but because of our certificates we disabled it now after update the certs to certificates folder not respecting the certs and we checked the www folder it has the certificates in platform folder
Anyone experiencing the same problem?
System info
Are you using ionic-native-wrapper?
Minimum viable code to reproduce
e.g.:
Screenshots If applicable, add screenshots to help explain your problem.
Reference https://dzone.com/refcardz/securing-mobile-applications-with-cert-pinning