Skip to content

Instantly share code, notes, and snippets.

@Baw-Appie
Last active June 3, 2026 11:24
Show Gist options
  • Select an option

  • Save Baw-Appie/62373bd33abb06032ab22135149f5d63 to your computer and use it in GitHub Desktop.

Select an option

Save Baw-Appie/62373bd33abb06032ab22135149f5d63 to your computer and use it in GitHub Desktop.
ChatGPT for macOS SSL Pinning Bypass

Step 1: Export Your Corporate Root CA Certificate

First, you need the root certificate (.pem file) of your company's web filtering/security proxy.

  1. Open the Keychain Access app (search via Spotlight Cmd + Space).
  2. In the search bar at the top right, type the name of your security solution (e.g., Zscaler, Netskope, Cisco).
  3. Look for the Root Certificate (Root CA) in the list (it usually has a blue certificate icon).
  4. Right-click the certificate and select "Export [Certificate Name]..."
  5. Choose your Desktop as the save location, select .pem (Privacy Enhanced Mail) as the file format, and save it.
  • For this guide, let's assume you named it proxy_cert.pem.

Step 2: Generate the SPKI Hash of the Certificate

Next, we need to extract the unique cryptographic hash (Base64-encoded SHA-256 SPKI Hash) that the ChatGPT app requires.

  1. Open the Terminal app.
  2. Copy and paste the following command, then press Enter. (This command reads the proxy_cert.pem file on your Desktop and calculates the hash):
openssl x509 -in ~/Desktop/proxy_cert.pem -noout -pubkey | openssl pkey -pubin -outform DER | openssl dgst -sha256 -binary | openssl base64
  1. The terminal will output a 44-character string. Copy this value.

(Example) A1b2C3d4E5f6G7h8I9j0K1l2M3n4O5p6Q7r8S9t0U1v=


Step 3: Add the Hash to ChatGPT's Preferences

Now, register your extracted hash into the ChatGPT app's preferences (NSUserDefaults). You must also include OpenAI's default hashes so the app continues to work normally when you are at home or off the corporate network.

  1. Open a text editor (like TextEdit or Notes). Copy the command block below, and replace [INSERT_YOUR_HASH_HERE] with the hash you copied in Step 2. (Keep the quotation marks "" intact).
defaults write com.openai.chat com.openai.pinned_cert_hash_list -array \
"[INSERT_YOUR_HASH_HERE]" \
"C5+lpZ7tcVwmwQIMcRtPbsQtWLABXhQzejna0wHFr8M=" \
"diGVwiVYbubAI3RW4hB9xU8e/CH2GnkuvVFZE8zmgzI=" \
"x+C0kJ2uYxDLS5lLqDkAFQRmwWLeak0Kk1WsiuDRnZ4=" \
"Y9mvm0exBk1JoQ57f9Vm28jKo5lFm/woKcVxrYxu80o=" \
"r/mIkG3eEpVdm+u/ko/cwxzOMo1bk4TyHIlByibiA5E=" \
"i7WTqTvh0OioIruIfFR4kMPnBqrS2rdiVPl/s2uC/CY=" \
"uUwZgwDOxcBXrQcntwu+kYFpkiVkOaezL0WYEZ3anJc=" \
"NfU84SZGEeAzQP434ex9TMmGxWE9ynD9BKpEVF8tryg=" \
"svcpi1K/LDysTd/nLeTWgqxYlXWVmC8rYjAa9ZfGmcU=" \
"I/Lt/z7ekCWanjD0Cvj5EqXls2lOaThEA0H2Bg4BT/o=" \
"8ca6Zwz8iOTfUpc8rkIPCgid1HQUT+WAbEIAZOFZEik=" \
"Fe7TOVlLME+M+Ee0dzcdjW/sYfTbKwGvWJ58U7Ncrkw=" \
"WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18=" \
"Wd8xe/qfTwq3ylFNd3IpaqLHZbh2ZNCLluVzmeNkcpw=" \
"K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q=" \
"cGuxAXyFXFkWm61cF4HPWX8S0srS9j0aSqN0k4AP+4A=" \
"fg6tdrtoGdwvVFEahDVPboswe53YIFjqbABPAdndpd8="
  1. Copy the entire modified command block, paste it into Terminal, and press Enter. (If it moves to the next line without an error message, it was successful).

Step 4: Restart the App and Verify

  1. Completely quit the ChatGPT desktop app if it is running (Shortcut: Cmd + Q).
  2. Reopen the ChatGPT app.
  3. Try logging in. The "wrong SSL certificate" error should be gone.

💡 How to Revert (Reset) If you made a mistake or want to restore the app to its original state, open Terminal and run this single command to delete the custom hash list. The app will go back to its default behavior:

defaults delete com.openai.chat com.openai.pinned_cert_hash_list

Automated Script: https://github.com/g1zm0e/Zscaler-Wrenches

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment