First, you need the root certificate (.pem file) of your company's web filtering/security proxy.
- Open the Keychain Access app (search via Spotlight
Cmd + Space). - In the search bar at the top right, type the name of your security solution (e.g.,
Zscaler,Netskope,Cisco). - Look for the Root Certificate (Root CA) in the list (it usually has a blue certificate icon).
- Right-click the certificate and select "Export [Certificate Name]..."
- 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.
Next, we need to extract the unique cryptographic hash (Base64-encoded SHA-256 SPKI Hash) that the ChatGPT app requires.
- Open the Terminal app.
- Copy and paste the following command, then press Enter. (This command reads the
proxy_cert.pemfile 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
- The terminal will output a 44-character string. Copy this value.
(Example)
A1b2C3d4E5f6G7h8I9j0K1l2M3n4O5p6Q7r8S9t0U1v=
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.
- 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="
- 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).
- Completely quit the ChatGPT desktop app if it is running (Shortcut:
Cmd + Q). - Reopen the ChatGPT app.
- 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