3

I'm using JMeter's proxy to record the HTTP traffic from a mobile app. It works fine with non secure HTTP requests, but when I try to make a HTTPS request I get an error: "The certificate for this server is invalid" (see screenshot below).

This is of course expected. If I'm on a PC I can simply click on "accept bad certificate" (or something like that) but this isn't an option for my mobile app (I'm testing amazon's app for example).

Is there a way to get my iPhone (or other mobile device) to accept JMeter's certificate? Is there another way to do this with a REAL mobile device?

edit: Some of the answers talk about how to modify my app. I can't modify the app myself - so I need a solution that doesn't require any app modification.

After some research I found this link: http://nat.guyton.net/2012/01/20/adding-trusted-root-certificate-authorities-to-ios-ipad-iphone/

Which almost works :) The comments say that in iOS 6 and up using a MD5 doesn't work, and the default key JMeter is using is MD5. Any thoughts?

Update Feb 13, 2014:
I had given up on this originally, but recently came across an article about using Charles proxy with a real device to capture SSL traffic by adding a certificate to your iPhone. After following the instructions here it works!
http://www.charlesproxy.com/documentation/faqs/ssl-connections-from-within-iphone-applications/

So now I know a solution IS possible, but I'm still stuck on how to get it to work - now using JMeter 2.11 and iOS 7

Thanks Ophir

jmeter proxy secure page iphone error screenshot

Ophir Prusak
  • 1,437
  • 13
  • 20

2 Answers2

0

These related questions may be helpful:

Community
  • 1
  • 1
Mike
  • 737
  • 1
  • 6
  • 14
0

I just happened to write an article on that given the new restrictions on iOS 13. In a nutshell:

  1. Generate a certificate.
  2. Import it into your proxy tool (I used OWASP ZAP).
  3. Import the certificate into iOS and add it as a trusted authority.
  4. Access iOS’ proxy settings and point it to your computer.

Full details in the article link below. Hope you find it helpful.

Best regards,

Andre

https://link.medium.com/gcU2SYZtn4

Andre Guerra
  • 1,117
  • 1
  • 9
  • 18