Java KeyStore , Keytool Nedir KeyTool Komutları
213 kelime · 2 dk okuma
Bu yazıda
Java KeyStore Nedir? KeyTool Komutları, Sertifika İşlemleri ekleme, oluşturma, primary key oluşturma işlemleri nedir? Self-Signed Sertifika ve KeyStore Üretme, CSR Sertifika Üretme, KeyStore'den Sertifika Silme, İmzalı Primary Sertifikayı KeyStore'a Eklemek, KeyStore Şifresini Değiştirmek, KeyStore Görüntüleme, Private Key Oluşturma Komutları
Bu yazıda Java Keytool kullanımını açıklayacağım.
Keytool ile Java içerisinde kullanılan ya da kullanılması istenen Keystore içerisindeki sertifikalarının yönetilmesini sağlamaktadır.
Keytool komutu ile yapabilecekler.
- Self-signed sertifika yükleyebiliriz.
- Sertifika görüntüleyebiliriz.
- Sertifika çıkarabiliriz.
- CSR işlemleri yapılabilir.
- Private Key oluşturabiliriz.
Self-Signed Sertifika ve KeyStore Üretme
keytool -genkey -keyalg RSA -alias selfsigned -keystore keystore.jks -storepass password -validity 720
CSR Sertifika Üretme
keytool -certreq -alias mydomain -keystore keystore.jks -storepass password -file mydomain.csr
KeyStore’den Sertifika Silme
keytool -delete -alias mydomain -keystore keystore.jks -storepass password
İmzalı Primary Sertifikayı KeyStore’a Eklemek
keytool -import -trustcacerts -alias mydomain -file mycrt.crt -keystore keystore.jks
KeyStore Şifresini Değiştirmek
keytool -storepasswd -new new_storepass -keystore keystore.jks
KeyStore Görüntüleme
/JAVA_HOME/jre/bin/keytool -list -keystore KeyStore -storepass password
Private Key Oluşturma
Private key oluşturmak için;
keytool -genkey -alias KeyToolAlias -keystore privateKey.store
komutu girmek yeterli olacaktır.
Sonrasında bizi gerekli bilgilerimizi girmemiz için bir komut satırı gelecektir.
Enter keystore password: 123 What is your first and last name? [Unknown]: Ad Soyad What is the name of your organizational unit? [Unknown]: Yazilimci What is the name of your organization? [Unknown]: example.com What is the name of your City or Locality? [Unknown]: TR What is the name of your State or Province? [Unknown]: TR What is the two-letter country code for this unit? [Unknown]: TR Is CN=Ad Soyad, OU=Yaizilimci, O=example.com, L=TR, ST=TR, C=TR correct? [no]: yes