Skip to content

Instantly share code, notes, and snippets.

@Crydust
Created September 11, 2018 13:35
Show Gist options
  • Save Crydust/16987ed289383ee2c4c4e5158180dfa4 to your computer and use it in GitHub Desktop.
Save Crydust/16987ed289383ee2c4c4e5158180dfa4 to your computer and use it in GitHub Desktop.
certificates in java cacerts
REM install a certificate
REM =======================
set KEYTOOL=C:\Workspace\opt\Java\jdk1.8.0_162\bin\keytool
set FILE=D:\home\kristof\Downloads\wildca.cer
set KEYSTORE=C:\Workspace\opt\Java\jdk1.8.0_162\jre\lib\security\cacerts
set ALIAS=certinga.wildca.intermediate
%KEYTOOL% -import -trustcacerts ^
-alias %ALIAS% ^
-file %FILE% ^
-keystore %KEYSTORE%
REM the password is: "changeit"
REM type "yes" when asked "Trust this certificate?"
REM delete a certificate
REM =======================
keytool -delete -alias %ALIAS% -keystore %KEYSTORE%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment