티스토리 뷰

발생일: 2014.01.15

키워드: iphone, charles, https packet, ssl packet, 찰스, 아이폰, SSL 패킷

문제:

아이폰 앱에서의 HTTPS 패킷을 찰스 프록시에서 확인하려고 한다.

맥에서는 찰스 인증서를 신뢰하는 인증서로 추가하는 방식(http://ohgyun.com/354)을 사용했었는데,
아이폰의 것은 어떻게 확인하면 될까?


해결책:

요약하면,

1. 찰스에서 Proxy Settings > SSL 에서 모든 주소(*)에 대해 SSL 프록싱하도록 설정한다.
2. 아이폰 사파리에서 http://charlesproxy.com/charles.crt에 접속한다. 허용. 허용.
    (주의: iPhone 에서 Chrome 앱으로는 다운로드가 되지 않는다. 사파리로 다운로드 받아야 한다.)
3. 패킷 확인확인~~




참고: 

http://stackoverflow.com/questions/15768143/ios-app-ssl-handshake-failed



SSL
You are able to intercept HTTP traffic from your device. The next step is to also intercept HTTPS traffic. To intercept data from SSL connections you'll need to download and install the Charles certificate on your device and computer.

Installing certificates on your computer
Download and unzip the Charles CA Certificate bundle. The bundle contains the Charles CA Certificate file.

Run the Keychain Access utility from the Applications/Utilities folder. This tool enables you to manage your certificates.

Choose the "login" keychain then go to the File menu and choose Import. Choose the .crt file you downloaded above, and ensure that the login keychain is chosen in the dropdown menu.

Complete the import and the Charles CA SSL Certificate will now be trusted for your login account.

Move the Charles Proxy SSL Proxying certificate from your login keychain to the System keychain by drag-and-drop if you want all users on the machine to trust it.
Installing certificate on your device
On your device, browse to http://charlesproxy.com/charles.crt then install the certificate.
After you have installed the certificates you must enable SSL Proxying in Charles.

In Charles go to Proxy > Proxy Settings.
Select the SSL.
Make sure that Enable SSL Proxying is checked.
Add a wildcard location (*). You should end up with something like this.
Restart Charlies and have fun.
Read more about SSL Proxying using Charles.

반응형
댓글
공지사항