mirror of
https://github.com/ProxymanApp/Proxyman.git
synced 2026-04-26 16:45:57 +03:00
[GH-ISSUE #1772] Cannot get the Root Certificate from Android client X509TrustManager #1765
Labels
No labels
Discussion
Feature request
In Progress...
Plugins
Waiting response
Windows
Windows
bug
duplicate
enhancement
feature
good first issue
iOS
macOS 10.11
question
wontfix
✅ Done
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Proxyman#1765
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @4332weizi on GitHub (Sep 18, 2023).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1772
Originally assigned to: @NghiaTranUIT on GitHub.
Description
We check the last
X509Certificateof the chain, which is passed to thecheckServerTrustedfunction in clientX509TrustManager. Then we import ourRoot Certificateinto the proxy, it works fine on Charles but cannot work on Proxyman. When using Proxyman, the size of thechainpassed is always 1, and doesn't contain the `Root CertificateSteps to Reproduce
X509TrustManagerRoot Certificateinto Proxyman and CharlesWhen using Proxyman:
Current Behavior
The certificate chain doesn't contain
Root CertificateExpected Behavior
The
Root Certificateis the last element of the certificate chainEnvironment
@NghiaTranUIT commented on GitHub (Sep 19, 2023):
Thanks. I will look on it 👍
@NghiaTranUIT commented on GitHub (Sep 19, 2023):
Just wondering: If Proxyman Certificate doesn't contain the your custom Root Certificate in a certificate chain, are you able to decrypt HTTPS traffic without SSL errors 🤔 ?
@4332weizi commented on GitHub (Sep 19, 2023):
I can find the Root Certificate on Chrome Certificate Viewer, I don't know why
checkServerTrusted(X509Certificate[] chain, String authType)receives only one X509Certificate.@NghiaTranUIT commented on GitHub (Sep 19, 2023):
if Proxyman can decrypt HTTPS traffic from your Android, it means the Proxyman Certificate is generated by your custom root certificate -> It also means that it's already in the Certificate Chain.
If it's not true, you get SSL Error on Android devices.
@4332weizi commented on GitHub (Sep 19, 2023):
Yes, maybe bugs in my app. I will look into it later.
@4332weizi commented on GitHub (Sep 26, 2023):
Proxyman:

Charles:

It seems Proxyman does not send the root CA to the certificates list, the server can omit the root CA.
Reference (RFC 5246 - TLS v1.2, sec. 7.4.2. - Server Certificate):
@4332weizi commented on GitHub (Sep 27, 2023):
@NghiaTranUIT Can you include an option to send the root CA in the certificate chain?
@4332weizi commented on GitHub (Oct 18, 2023):
please
@NghiaTranUIT commented on GitHub (Oct 18, 2023):
@4332weizi can you use Charles Proxy and print the Root CA ?
chain[0]to see the name of the CA Certificate.I'm not sure how to configure it when using TLSConfiguration.
One of these properties can be fixed:
github.com/apple/swift-nio-ssl@c05ca760bd/Sources/NIOSSL/TLSConfiguration.swift (L278)github.com/apple/swift-nio-ssl@c05ca760bd/Sources/NIOSSL/TLSConfiguration.swift (L325)@4332weizi commented on GitHub (Oct 18, 2023):
yes,


chain[chain.length - 1]is the Root CA@NghiaTranUIT commented on GitHub (Oct 18, 2023):
Can you print out the Alternative Subject Name and the Issuer Object?
@4332weizi commented on GitHub (Oct 18, 2023):
chain[0]:@NghiaTranUIT commented on GitHub (Oct 18, 2023):
May I ask: Are you using Custom Certificate ? Or just use as normal (Use Proxyman CA Certificate).
@4332weizi commented on GitHub (Oct 18, 2023):
I am using a Custom Certificate
@NghiaTranUIT commented on GitHub (Oct 18, 2023):
Sorry, 1 question: Are you using a Custom Root Certificate, or Server Certificate or Client Certificate ? 🤔
@4332weizi commented on GitHub (Oct 18, 2023):
Custom Root Certificate
@NghiaTranUIT commented on GitHub (Oct 18, 2023):
Can you try this build: https://download.proxyman.io/beta/Proxyman_4.12.0_Add_to_rootTrusts.dmg
I add the Root Certificate to the
trustRootproperty. I can't test it because I don't have your setup.@4332weizi commented on GitHub (Oct 18, 2023):
seem nothing changed
@NghiaTranUIT commented on GitHub (Oct 18, 2023):
How about this build: https://download.proxyman.io/beta/Proxyman_4.12.0_try_to_fix_rootTrusts_v2.dmg
@4332weizi commented on GitHub (Oct 19, 2023):
Nice, I can see the Root CA now, and SSL Proxying works. Thank you so much!
@NghiaTranUIT commented on GitHub (Oct 19, 2023):
@4332weizi can you check this build again: https://download.proxyman.io/beta/Proxyman_4.12.0_Fix_Trust_Root_v3.dmg
I did some refactoring and I think it should work as intended. Sorry, I don't have your setup, so I can't verify it by my own.
@4332weizi commented on GitHub (Oct 19, 2023):
Just like the previous version!