0

Im getting this errror when trying to hit https server.

NSLocalizeddescription=cancellel

Which already done pin certificate. But error still happens, anyone can help me?

NSString *cerPath = [NSString stringWithFormat:@"%@.cer",[Environment cert]]; [[WLClient sharedInstance] pinTrustedCertificatePublicKeyFromFile:cerPath];

  • What's the return type of `-[Environment cert]`? – Tommy Dec 21 '20 at 02:14
  • MobileFirstSSLCert_LOCAL_UAT Coz my cert is MobileFirstSSLCert_LOCAL_UAT.cer – Thing Thing Dec 21 '20 at 02:17
  • ... if it's not `NSString` then are you sure `-description` produces something sensible? It's not idiomatic to use `-description` to produce well-defined output, but there's no strict reason why it may not do what you want. But have you double checked that `cerPath` holds something reasonable? – Tommy Dec 21 '20 at 02:25
  • Should be correct, coz if i anyhow put in string, it will crash the app. But this wont crash the app – Thing Thing Dec 21 '20 at 02:30
  • A common way to implement `-description`, and the way Apple intends, is to return a string that describes the object for the benefit of a human being. It may or may not also be correct syntax for some technical purpose, and may or may not continue to be as code is updated. If I were you I'd add a breakpoint or an `NSLog(@"%@", cerPath);` and see whether what it produces is reasonable. – Tommy Dec 21 '20 at 02:42
  • Ya i added NSLog. and the result is correct MobileFirstSSLCert_LOCAL_UAT.cer – Thing Thing Dec 21 '20 at 02:46
  • When exactly do you see the problem? Is it when the API `pinTrustedCertificate` executes? Or later? – Vivin K Dec 21 '20 at 04:51

0 Answers0