Java "keytool" Commands and KeyStore Files

This chapter provides tutorial notes and example codes on the Java 'keytool' command. Topics include introduction of KeyStore file and 'keytool' command; generating and managing keys and self-signed certificates; exporting and importing certificates; generating CSR (Certificate Signing Request); signing CSR with X.509 extensions; exporting private/public key pairs.

What Is Java KeyStore File?

"keytool" - Key and Certificate Management Tool

"keytool -genkeypair" - Generate Key with Self-Signed Certificate

"keytool -export/import" - Export and Import Certificates

"keytool -keyclone" - Clone Self-Signed Certificate with New Identity

"keytool -certreq" - Generate CSR (Certificate Signing Request)

"keytool -gencert" - Sign CSR with CA certificate

"keytool -gencert -ext" - Sign CSR with X.509 Extensions

Export Key Pair using "keytool -importkeystore"

Conclusions:

Table of Contents

 About This Book

 Introduction of PKI (Public Key Infrastructure)

 Introduction of PKI Certificate

 PKI Certificate File Formats

 OpenSSL - Cryptography Toolkit

 "openssl ca" - CA (Certificate Authority) Tool

Java "keytool" Commands and KeyStore Files

 PKI Certificate Store

 PKCS12 Certificate Bundle File

 PKCS7 Certificate Chain File

 PKI Certificate Related Terminology

 References

 Full Version in PDF/EPUB