0

I am having trouble with Xcode 7.0.5 and self-signed certs (I think). I'm wondering if any of the Alamofire swift-2.0 branch test cases cover self-signed certs?

Bill Wynne
  • 53
  • 5
  • I see the trust unit tests and the download unit tests, but I don't see any download tests that rely on the trust code base? Is that a correct read? I need to add a test at least for myself that tests downloading with a self-signed. – Bill Wynne Aug 12 '15 at 14:03

1 Answers1

1

The majority of the certificates that exist in the Alamofire test suite are actually self-signed certs. It works exactly as you would expect.

All the data task tests that are written can easily be converted to download task tests by switching the name and providing a destination parameter. This will download the data into a temporary file instead of reading it into memory. Otherwise they're more or less the same operation.

Additionally, all server trust challenges are handled by the same ServerTrustPolicy. Data, Download and Upload requests are all handled in the same way.

Best of luck.

cnoon
  • 16,575
  • 7
  • 58
  • 66