Last active
July 4, 2020 10:38
-
-
Save PetrGlad/ee324b70f009066bb61b52726e4a22f2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Fix for working in IntelliJ behind corporate firewall in Linux. | |
# Note that this makes your Idea's TLS communications monitored. | |
# Note that if you have a JetBrains license owned by your company, | |
# then better ask your IT support to fix cert problems instead. | |
# Howto: | |
# 0. Your company cert is expected to be in /usr/local/share/ca-certificates/extra/MyCompanyCA.crt | |
# 1. Launch Intellij. | |
# 2. Copy CA storage path from the "certificate problem" pop up dialog. Close IntelliJ. | |
# 3. Run this script with that path as an argument. | |
CASTORE=$1 | |
openssl x509 \ | |
-in /usr/local/share/ca-certificates/extra/MyCompanyCA.crt \ | |
-inform pem \ | |
-out ca.der \ | |
-outform der | |
keytool -importcert \ | |
-alias aggrekoca \ | |
-keystore "$CASTORE" \ | |
-storepass changeit \ | |
-file ca.der |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment