[GH-ISSUE #421] 400 Bad Request downloading iOS Root CA #417

Open
opened 2026-03-03 19:18:34 +03:00 by kerem · 11 comments
Owner

Originally created by @FinHorsley on GitHub (Mar 2, 2020).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/421

Originally assigned to: @NghiaTranUIT on GitHub.

Proxyman version? (Ex. Proxyman 1.4.3)

Version 1.17.1 (11710)

macOS Version? (Ex. mac 10.14)

Version 10.15.3 (19D76)

iOS Version

Version 13.3.1

Steps to reproduce

Follow the steps to install iOS certificate on physical device.

The http://proxy.man/ssl request returns a 400 Bad Request

image

Expected behavior

iOS will show the alert to install the certificate

Originally created by @FinHorsley on GitHub (Mar 2, 2020). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/421 Originally assigned to: @NghiaTranUIT on GitHub. ### Proxyman version? (Ex. Proxyman 1.4.3) Version 1.17.1 (11710) ### macOS Version? (Ex. mac 10.14) Version 10.15.3 (19D76) ### iOS Version Version 13.3.1 ### Steps to reproduce Follow the steps to install iOS certificate on physical device. The http://proxy.man/ssl request returns a 400 Bad Request ![image](https://user-images.githubusercontent.com/10697741/75720393-52c6cc80-5cce-11ea-99eb-0d8542a5ba46.png) ### Expected behavior iOS will show the alert to install the certificate
Author
Owner

@NghiaTranUIT commented on GitHub (Mar 3, 2020):

Hi @FinHorsley, I tested and I was able to reproduce your bug if we had not install the Proxyman CA first (Step 1)

Screen_Shot_2020-03-03_at_9_54_04_AM
  1. Let try to install the Proxyman Certificate first (Verify that you're able to see HTTPS Response on Google.com from Safari or Google Chrome)
  2. Config the HTTP Proxy on your iPhone
  3. Going to proxy.man/ssl
  4. Follow the remaining steps to trust the certificate

IMG_4074

Tutorial: https://proxyman.io/blog/2019/06/How-I-use-Proxyman-to-see-HTTP-requests-responses-on-my-iPhone.html

Please let me know if it works for you.

<!-- gh-comment-id:593741683 --> @NghiaTranUIT commented on GitHub (Mar 3, 2020): Hi @FinHorsley, I tested and I was able to reproduce your bug if we had not install the Proxyman CA first (Step 1) <img width="831" alt="Screen_Shot_2020-03-03_at_9_54_04_AM" src="https://user-images.githubusercontent.com/5878421/75738527-24c8a300-5d35-11ea-8d89-49f733dec944.png"> 1. Let try to install the Proxyman Certificate first (Verify that you're able to see HTTPS Response on Google.com from Safari or Google Chrome) 2. Config the HTTP Proxy on your iPhone 3. Going to proxy.man/ssl 4. Follow the remaining steps to trust the certificate ![IMG_4074](https://user-images.githubusercontent.com/5878421/75738649-6ce7c580-5d35-11ea-8da4-fc1ec987b77e.PNG) Tutorial: https://proxyman.io/blog/2019/06/How-I-use-Proxyman-to-see-HTTP-requests-responses-on-my-iPhone.html Please let me know if it works for you.
Author
Owner

@FinHorsley commented on GitHub (Mar 3, 2020):

Thanks 😊

Is the cause behind this because the “Install Root Proxyman Certificate on this Mac” actually creates the Root CA?

In my case I was trying to fetch the root CA from iOS, but ProxyMan hadn’t created the CA yet?

<!-- gh-comment-id:593946529 --> @FinHorsley commented on GitHub (Mar 3, 2020): Thanks 😊 Is the cause behind this because the “Install Root Proxyman Certificate on this Mac” actually creates the Root CA? In my case I was trying to fetch the root CA from iOS, but ProxyMan hadn’t created the CA yet?
Author
Owner

@NghiaTranUIT commented on GitHub (Mar 3, 2020):

Is the cause behind this because the “Install Root Proxyman Certificate on this Mac” actually creates the Root CA?

Yes, it's

In my case I was trying to fetch the root CA from iOS, but ProxyMan hadn’t created the CA yet?

That's correct.

Proxyman separates the generation Proxyman CA step and the fetch from iOS. In order to work, we have to install the certificate firstly 🙌

<!-- gh-comment-id:593951437 --> @NghiaTranUIT commented on GitHub (Mar 3, 2020): > Is the cause behind this because the “Install Root Proxyman Certificate on this Mac” actually creates the Root CA? Yes, it's > In my case I was trying to fetch the root CA from iOS, but ProxyMan hadn’t created the CA yet? That's correct. Proxyman separates the generation Proxyman CA step and the fetch from iOS. In order to work, we have to install the certificate firstly 🙌
Author
Owner

@NghiaTranUIT commented on GitHub (Mar 3, 2020):

I also improve the behavior by adding some useful instruction if we got 400 Bad Request (https://github.com/ProxymanApp/Proxyman/issues/422) 👍

<!-- gh-comment-id:593951952 --> @NghiaTranUIT commented on GitHub (Mar 3, 2020): I also improve the behavior by adding some useful instruction if we got 400 Bad Request (https://github.com/ProxymanApp/Proxyman/issues/422) 👍
Author
Owner

@FinHorsley commented on GitHub (Mar 3, 2020):

Why do i need to trust the RootCA on macOS in order to see SSL responses coming from an iOS device?

I understand that I'd need to trust the certificate on Mac to see the macs traffic, but not for iOS

<!-- gh-comment-id:593959919 --> @FinHorsley commented on GitHub (Mar 3, 2020): Why do i need to trust the RootCA on macOS in order to see SSL responses coming from an iOS device? I understand that I'd need to trust the certificate on Mac to see the macs traffic, but not for iOS
Author
Owner

@NghiaTranUIT commented on GitHub (Mar 3, 2020):

Why do i need to trust the RootCA on macOS in order to see SSL responses coming from an iOS device?

It's a really good question. From what I understand, we don't need to trust RootCA on macOS, but we have to generate the certificate firstly(and the generation step comes with trusting the certificate, it' our decision to make it easier to use).

In your first case, you haven't generated any certificates, so it's 400 Bad Request (Missing file)

<!-- gh-comment-id:593985672 --> @NghiaTranUIT commented on GitHub (Mar 3, 2020): > Why do i need to trust the RootCA on macOS in order to see SSL responses coming from an iOS device? It's a really good question. From what I understand, we don't need to trust RootCA on macOS, but we have to generate the certificate firstly(and the generation step comes with trusting the certificate, it' our decision to make it easier to use). In your first case, you haven't generated any certificates, so it's 400 Bad Request (Missing file)
Author
Owner

@NghiaTranUIT commented on GitHub (Mar 3, 2020):

But thank for the question, I will consider to improve this procedure 👍 @FinHorsley

<!-- gh-comment-id:593985859 --> @NghiaTranUIT commented on GitHub (Mar 3, 2020): But thank for the question, I will consider to improve this procedure 👍 @FinHorsley
Author
Owner

@FinHorsley commented on GitHub (Mar 3, 2020):

So I have created the root CA (using the manual process) on my Mac, but purposely didn’t trust that certificate.

When I come to intercept traffic from iOS, ProxyMan says that I have to trust the certificate on MacOS before I can inspect SSL responses.

Is this expected behaviour?

<!-- gh-comment-id:593991424 --> @FinHorsley commented on GitHub (Mar 3, 2020): So I have created the root CA (using the manual process) on my Mac, but purposely didn’t trust that certificate. When I come to intercept traffic from iOS, ProxyMan says that I have to trust the certificate on MacOS **before** I can inspect SSL responses. Is this expected behaviour?
Author
Owner

@NghiaTranUIT commented on GitHub (Mar 3, 2020):

At the moment, it's expected behavior because at the initial development, I'm not aware that we don't need to trust Proxyman CA on macOS in order to intercept the requests from your iPhone 😬

I will consider to fix it to make more flexible than forcing trust the certificates.

<!-- gh-comment-id:593999996 --> @NghiaTranUIT commented on GitHub (Mar 3, 2020): At the moment, it's expected behavior because at the initial development, I'm not aware that we don't need to trust Proxyman CA on macOS in order to intercept the requests from your iPhone 😬 I will consider to fix it to make more flexible than forcing trust the certificates.
Author
Owner

@FinHorsley commented on GitHub (Mar 3, 2020):

That’s great 😊

(I don’t think it’s necessarily to install the rootCA on MacOS for this, having used tools like MitmProxy in the past I know they don’t require this)

<!-- gh-comment-id:594006002 --> @FinHorsley commented on GitHub (Mar 3, 2020): That’s great 😊 (I don’t think it’s necessarily to install the rootCA on MacOS for this, having used tools like MitmProxy in the past I know they don’t require this)
Author
Owner

@NghiaTranUIT commented on GitHub (Mar 3, 2020):

Totally agree 👍

<!-- gh-comment-id:594024892 --> @NghiaTranUIT commented on GitHub (Mar 3, 2020): Totally agree 👍
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Proxyman#417
No description provided.