Creating Keys Using Java Keytool
2109 단어 keytool
1.Create A Pair Of Keys
In the open terminal/command window, type:
keytool –genkey –alias %alias% -keystore %keystore%
Replacing %alias% with a name for your pair of keys and %keystore% with a name for your keystore, then press Enter.In this example, %alias% is KeyPair_1, and %keystore% is MyPrivateKey.store.Once you have completed these steps, your keystore will be saved on the computer. It may be saved in your Documents folder, /home folder, or on the root drive.
2.Export A Certificate
In the terminal/command window, type:
keytool –export –alias %alias% -file %file% -keystore %keystore%
Replacing
%alias% and %keystore%
with the values you used previously, and %file% with the name you would like to save your certificate as.In this example, %file% is Certificate1.cert, but you should name yours something different.You will also be asked for the keystore password.It will be saved in the same location as the keystore(usually your Documents or /home folder or the root drive).
3.Import A Certificate
In the terminal/command window, type:
keytool –import –alias %alias% -file %file% -keystore %keystore%
Where %alias% and %keystore% are
differen
t values than you used previously, and %file% is the name of the file you saved your certificate to.You will also be asked to create a password for this new keystore.
Usually you want to import your cetificate to jre's keystore,now fllowing steps:
cd /usr/java/jdk/jdk1.6.0_29/jre/lib/security # cd your $java_home/jre/lib/security
then import to jre keystore:
sudo keytool -import -alias test -file /home/guolei/client.cert -keystore cacerts
jre's keystore default password is changeit,type the password,then everything is ok.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Creating Keys Using Java KeytoolThe Java keytool application manages a database of keys and certificates.Users can create their own self-authenticated...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.