When using Cydia Impactor to sideload and install IPA files onto iOS mobile devices such as iPhone and iPad on a Windows PC, the following error may occur when signing the IPA file:

Peer certificate cannot be authenticated with given CA certificates
SSL certificate problem: self signed certificate in certificate chain

Cydia Impactor http-win.cpp:158 Error

Cydia Impactor is an essential tool to impact (install) various custom or Apple-unsanctioned apps onto non-jailbroken iPhone, iPad and iPod touch, by signing the app with a developer certificate in order to allow the IPA to be installed on the iOS device for testing purpose. Due to limitation of 7 days expiry for free Apple Developer account, Cydia Impactor is a must to re-impact and sideload the IPA when certificate expired.

Many useful apps have relied on side-loading to bring advanced features and functionality to iOS device users who cannot jailbreak, or don’t want to jailbreak, such as PokeGo++ 2.0. Or, it’s simply a prerequisite for jailbreak. For example, the semi-untethered jailbreak for iOS 10, Yalu, has to be side-loaded to iPhone, iPad or iPod touch with Cydia Impactor to initiate the jailbreak.

Thus, with the error in Cydia Impactor, the side-loaded apps will stop launching once past the 7 days expiry of certificate (or 1 year for paid Apple Developer account), if you’re unable to re-impact the IPA file.

The cause for http-win.cpp:158 error is that Cydia Impactor on Windows is using a self-signed certificate which has been revoked by Apple. If you’re encountering with http-win.cpp:158 error when using Cydia Impactor, here’s a few workarounds that you can try:

  • http-win.cpp:158 error in Cydia Impactor occurs only when running in Windows PC. It doesn’t have the same problem in macOS. So, just open up your macOS machine and run the Impactor to side-load.

    If you don’t have macOS system, you can set up a VM (virtual machine) and install mac OS (search for macOS image), or for faster solution, download a pre-installed macOS VM (search for the VM file) which can be loaded into Hyper-V or VMWare to boot up instantly to macOS Desktop.

    From there, you can connect the iOS device to the computer and pass-thru to the virtual machine, where you can run the Impactor to sign the IPA properly.

  • Manually change the date to a date before the certificate expiry, which may allow the iOS been tricked into thinking that the app hasn’t expired, and allow it to run.
  • Install the IPA that is signed by another developer, if it’s available.
  • Waiting for Cydia Impactor’s developer, Saurik, to fix and release the new version of Cydia Impactor (Cydia Impactor is closed source and thus nobody else can fix it). But do keep checking for new version of Cydia Impactor at cydiaimpactor.com.

    Update: The developer, Saurik, has updated Cydia Impactor to version 0.9.39 which fixes the certificate error when signing IPA on Windows machines. To update, check for update in the Impactor program, or redownload Cydia Impactor from official website.