[GH-ISSUE #231] Cleanup Certificates on close? #228

Closed
opened 2026-03-03 19:16:25 +03:00 by kerem · 4 comments
Owner

Originally created by @psimoneau22 on GitHub (Jul 29, 2019).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/231

Originally assigned to: @NghiaTranUIT on GitHub.

Proxyman version? (Ex. Proxyman 1.4.3)

  • 1.4.6

macOS Version? (Ex. mac 10.14)

10.13.6 (High Sierra)

Steps to reproduce

Open proxyman. Navigate to any url with browser. Select Enable for All Domains in Proxyman.

Close proxyman. Check Keychain. Proxyman CA issued certificates for every domain accessed still exist

Expected behavior

Keychain certificates should be left in the same state they were before the app was opened, removing all Proxyman issued certs.

I would have expected the app to clean up the system when it is done. Its not a big deal, but I am just wondering if it is possible, and why it works the way it does.

Screenshots (optional)

  • none
Originally created by @psimoneau22 on GitHub (Jul 29, 2019). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/231 Originally assigned to: @NghiaTranUIT on GitHub. ### Proxyman version? (Ex. Proxyman 1.4.3) - 1.4.6 ### macOS Version? (Ex. mac 10.14) 10.13.6 (High Sierra) ### Steps to reproduce Open proxyman. Navigate to any url with browser. Select Enable for All Domains in Proxyman. Close proxyman. Check Keychain. Proxyman CA issued certificates for every domain accessed still exist ### Expected behavior Keychain certificates should be left in the same state they were before the app was opened, removing all Proxyman issued certs. I would have expected the app to clean up the system when it is done. Its not a big deal, but I am just wondering if it is possible, and why it works the way it does. ### Screenshots (optional) - none
kerem 2026-03-03 19:16:25 +03:00
Author
Owner

@NghiaTranUIT commented on GitHub (Jul 30, 2019):

Hey, that's really valid point. Thank you for pointing it out 👍

I will take it into account in Proxyman 1.5.0. Right now, the re-mapn response from file is on the way.

<!-- gh-comment-id:516235405 --> @NghiaTranUIT commented on GitHub (Jul 30, 2019): Hey, that's really valid point. Thank you for pointing it out 👍 I will take it into account in Proxyman 1.5.0. Right now, the `re-mapn response from file` is on the way.
Author
Owner

@NghiaTranUIT commented on GitHub (Nov 7, 2019):

So, I figured out how we solve this issues.

Technically, Proxyman is using SecPKCS12Import from Security framework to read the p12 files , then extracting the pubic and private keys. It's crucial for SSL Handshaking between Proxyman and the client. However, SecPKCS12Import import the cert to the KeyChain by default.

I researched SecItemImport, and the result is same without touching to the KeyChain. I will release the fix in next release 1.9.0 👍

Thank you for pointing it out 😄

Ref:

<!-- gh-comment-id:550917641 --> @NghiaTranUIT commented on GitHub (Nov 7, 2019): So, I figured out how we solve this issues. Technically, Proxyman is using `SecPKCS12Import` from `Security` framework to read the p12 files , then extracting the pubic and private keys. It's crucial for SSL Handshaking between Proxyman and the client. However, `SecPKCS12Import` import the cert to the KeyChain by default. I researched `SecItemImport`, and the result is same without touching to the KeyChain. I will release the fix in next release 1.9.0 👍 Thank you for pointing it out 😄 Ref: - https://forums.developer.apple.com/thread/31711 - https://developer.apple.com/documentation/security/1396915-secpkcs12import
Author
Owner

@psimoneau22 commented on GitHub (Nov 7, 2019):

this is great, thank you!

<!-- gh-comment-id:550958753 --> @psimoneau22 commented on GitHub (Nov 7, 2019): this is great, thank you!
Author
Owner

@NghiaTranUIT commented on GitHub (Nov 8, 2019):

All done 🎉

🤯 Changelogs

  • Create new private keychain for each app, Proxyman or Setapp
  • Store the p12
  • Remove when the app quits

Here is the BETA: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_1.8.0_Keychain_issues.dmg

I will officially release in this weekend or next week at least 👍 😄

<!-- gh-comment-id:551386440 --> @NghiaTranUIT commented on GitHub (Nov 8, 2019): All done 🎉 ## 🤯 Changelogs - [x] Create new private keychain for each app, Proxyman or Setapp - [x] Store the p12 - [x] Remove when the app quits Here is the BETA: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_1.8.0_Keychain_issues.dmg I will officially release in this weekend or next week at least 👍 😄
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#228
No description provided.