Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to fix Cydia Impactor "http-win.cpp:160" error as of 2018-08-11

How to fix Cydia Impactor "http-win.cpp:160" error as of 2018-08-11

As per https://www.reddit.com/r/jailbreak/comments/95qb5d/discussion_cydia_impactor_ccp_160_error_megathread/ Cydia Impactor is currently throwing the following error on Windows:

---------------------------
Error
---------------------------
http-win.cpp:160
Peer certificate cannot be authenticated with given CA certificates
SSL certificate problem: self signed certificate in certificate chain
---------------------------
OK
---------------------------

tl;dr

Note: This very hacky fix is not thoroughly tested and may cause issues. Hopefully an updated Cydia Impactor is released soon to truly address the problem.

  1. Make a backup copy of the file Impactor.dat (it comes with Cydia Impactor and should be in the same directory as your Impactor.exe) just in case
  2. Open the original Impactor.dat in 7zip
  3. Delete verisign-2048-256.pem from inside of Impactor.dat using the 7zip window
  4. Use notepad.exe to save the following text to a new file on your hard drive. The file should be called verisign-2048-256.pem (without the usual .txt extension!)
-----BEGIN CERTIFICATE-----
MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBh
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBH
MjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAwMDBaMGExCzAJBgNVBAYTAlVT
MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j
b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkqhkiG
9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlUyfuI
2/Ou8jqJkTx65qsGGmvPrC3oXgkkRLpimn7Wo6h+4FR1IAWsULecYxpsMNzaHxmx
1x7e/dfgy5SDN67sH0NO3Xss0r0upS/kqbitOtSZpLYl6ZtrAGCSYP9PIUkY92eQ
q2EGnI/yuum06ZIya7XzV+hdG82MHauVBJVJ8zUtluNJbd134/tJS7SsVQepj5Wz
tCO7TG1F8PapspUwtP1MVYwnSlcUfIKdzXOS0xZKBgyMUNGPHgm+F6HmIcr9g+UQ
vIOlCsRnKPZzFBQ9RnbDhxSJITRNrw9FDKZJobq7nMWxM4MphQIDAQABo0IwQDAP
BgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUTiJUIBiV
5uNu5g/6+rkS7QYXjzkwDQYJKoZIhvcNAQELBQADggEBAGBnKJRvDkhj6zHd6mcY
1Yl9PMWLSn/pvtsrF9+wX3N3KjITOYFnQoQj8kVnNeyIv/iPsGEMNKSuIEyExtv4
NeF22d+mQrvHRAiGfzZ0JFrabA0UWTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NG
Fdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBHQRFXGU7Aj64GxJUTFy8bJZ91
8rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/iyK5S9kJRaTe
pLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl
MrY=
-----END CERTIFICATE-----
  1. Add the file you created in step 4 to the inside of Impactor.dat using your 7zip window from step 2

The long version

By capturing some Cydia Impactor traffic using Wireshark, we see that the host https://developerservices2.apple.com is using the following certificate chain:

  • 0c:8b:7f:c5:c8:ed:73:80:29:7a:a7:d3:52:5a:4c:6a (Apple's leaf certificate, valid as of 2018-07-25)
  • Which is signed by 0c:8e:e0:c9:0d:6a:89:15:88:04:06:1e:e2:41:f9:af (Digicert Global CA G2)
  • Which is signed by 03:3a:f1:e6:a7:11:a9:a0:bb:28:64:b1:1d:09:fa:e5 (Digicert Global Root G2 - the trusted root certificate for the chain)

This trusted root certificate can be obtained directly from DigiCert and then pem-encoded using the following:

% curl -s https://dl.cacerts.digicert.com/DigiCertGlobalRootG2.crt | openssl x509 -in - -inform der    
-----BEGIN CERTIFICATE-----
MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBh
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBH
MjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAwMDBaMGExCzAJBgNVBAYTAlVT
MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j
b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkqhkiG
9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlUyfuI
2/Ou8jqJkTx65qsGGmvPrC3oXgkkRLpimn7Wo6h+4FR1IAWsULecYxpsMNzaHxmx
1x7e/dfgy5SDN67sH0NO3Xss0r0upS/kqbitOtSZpLYl6ZtrAGCSYP9PIUkY92eQ
q2EGnI/yuum06ZIya7XzV+hdG82MHauVBJVJ8zUtluNJbd134/tJS7SsVQepj5Wz
tCO7TG1F8PapspUwtP1MVYwnSlcUfIKdzXOS0xZKBgyMUNGPHgm+F6HmIcr9g+UQ
vIOlCsRnKPZzFBQ9RnbDhxSJITRNrw9FDKZJobq7nMWxM4MphQIDAQABo0IwQDAP
BgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUTiJUIBiV
5uNu5g/6+rkS7QYXjzkwDQYJKoZIhvcNAQELBQADggEBAGBnKJRvDkhj6zHd6mcY
1Yl9PMWLSn/pvtsrF9+wX3N3KjITOYFnQoQj8kVnNeyIv/iPsGEMNKSuIEyExtv4
NeF22d+mQrvHRAiGfzZ0JFrabA0UWTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NG
Fdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBHQRFXGU7Aj64GxJUTFy8bJZ91
8rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/iyK5S9kJRaTe
pLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl
MrY=
-----END CERTIFICATE-----

Cydia Impactor ships with a file called Impactor.dat which contains several trusted root CA certificates:

  • geotrust-2048-256.pem
  • verisign-1024-128.pem
  • verisign-2048-128.pem
  • verisign-2048-256.pem

Replacing any of these with a PEM-encoded copy of the Digicert Global Root G2 certificate seems to fix the "http-win.cpp:160" error.

https://twitter.com/justinsteven

@LuciusW

This comment has been minimized.

Copy link

commented Aug 11, 2018

Made an account just to say this, but it works! Thanks!

@Ahmo02

This comment has been minimized.

Copy link

commented Aug 11, 2018

I swear to god, me too. I only created this account to say thank you alot man. Only fix i found on the internet.

@SertixGamer

This comment has been minimized.

Copy link

commented Aug 11, 2018

I just registered to thank you very much! thank you thank you thank you!

@Sphyn0x

This comment has been minimized.

Copy link

commented Aug 11, 2018

Just registered too, works like a charm, THANK YOU!

@AAPL85

This comment has been minimized.

Copy link

commented Aug 11, 2018

Tks!! the #1 Works for Me :D

@dany4president

This comment has been minimized.

Copy link

commented Aug 11, 2018

Thank you very much! Worked perfectly.

@ImpactorNotWorking

This comment has been minimized.

Copy link

commented Aug 11, 2018

now getting a 7460 error in Impactor

@githubos1

This comment has been minimized.

Copy link

commented Aug 11, 2018

PERFECT for me as well - needed to resideload g0blin jb
iPhone6, iOS 10.2.1,

  • revoked certificates with patched (above methode) Impactor 0.9.4.3 (for win)
  • resigned with patched (above methode) Impactor 0.9.4.4 (for win)

Thank's a million !!
Oliver

@nkujomiru

This comment has been minimized.

Copy link

commented Aug 11, 2018

Works perfectly on Win10, thanks a LOT

@kaka1555

This comment has been minimized.

Copy link

commented Aug 12, 2018

thx so much , only method that worked and i created an account just to thank you <3

@rosenoire57

This comment has been minimized.

Copy link

commented Aug 12, 2018

Bonjour, je m'inscris juste pour vous dire un énorme merci !!!!!

@rafaelmafra

This comment has been minimized.

Copy link

commented Aug 12, 2018

I did exactly what the main post suggested and now I'm getting this error:

_http-lnx.cpp:92
assert(cert != NULL)

Does anyone know how to fix it? tks in advance.

I'm using cydia 0.9.44 and installing NvwaStone_1.1.ipa

========================================================

Now I tried with newest Impactor64_0.9.45 version with default Impactor.dat and works!!

@judibulu

This comment has been minimized.

Copy link

commented Aug 13, 2018

its work, using impactor.dat in impactor0.943 folder to revoke
and using impactor.dat in impactor 0.944 to re-jb

thx in advance

@almcarvalho

This comment has been minimized.

Copy link

commented Aug 14, 2018

when I click add in 7zip I get the error: not suported operation :/ pls help

@SoulxDD

This comment has been minimized.

Copy link

commented Aug 15, 2018

@almcarvalho and for any other users getting the Error that you cannot ADD a file into Impactor.dat using the provided "Add" button - Just drag and drop while you have Impactor.dat open with 7zip! :D

Also, thank you Justin for the quick and easy fix and easy to follow instructions!

@machyavelly

This comment has been minimized.

Copy link

commented Aug 21, 2018

THANK YOU SO MUCH
your god bless you :)

@casthieleseban

This comment has been minimized.

Copy link

commented Aug 22, 2018

Muchas gracias, si bien esta en otro idioma, me funciono, Gracias.

@santanaruben

This comment has been minimized.

Copy link

commented Sep 4, 2018

Hi guys cydia impactor 0.9.45 was released and solves the problem. Thanks to @justinsteven.

@silviu2488

This comment has been minimized.

Copy link

commented Sep 4, 2018

Thank you!

@gggomg

This comment has been minimized.

Copy link

commented Sep 10, 2018

Thanks a lot, my friend!

@nalomoly

This comment has been minimized.

Copy link

commented Sep 12, 2018

Thanks its works :D

@bakhtarn

This comment has been minimized.

Copy link

commented Jan 2, 2019

You are awsome !!

@Emmanuelgyamfi

This comment has been minimized.

Copy link

commented Jan 28, 2019

You are a genius buddy
Thanks so much
Had to sign up to thank you. Keep up bro

@g4merjb

This comment has been minimized.

Copy link

commented Mar 28, 2019

I love when the correct solution is on the first page of results after googling the problem. Thank you very much guys

@PacoVD

This comment has been minimized.

Copy link

commented Apr 11, 2019

You are a genius JustinSteven thank you

@PacoVD

This comment has been minimized.

Copy link

commented Apr 11, 2019

I did installed fine, however, the App doesn't launch, when I click on the Icon it shows the Niantic screen for a sec. then disappears

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.