""keytool" Importing Maria's Certificate Signed by CA

This section provides a tutorial example on how to import a certificate signed by a CA using 'OpenSSL' into a 'keystore' file using 'keytool'

After importing CA's certificate (Herong's certificate), Maria should import her own certificate which was signed by the CA (Herong) using the "keytool -importcert" command as shown below:

C:\herong>keytool -importcert -alias maria_crt -keypass keypass 
-file maria.crt -keystore maria.jks -storepass jkspass

Certificate was added to keystore

The command was the same one used to import CA's certificate. But this time, "keytool" did not ask Maria to trust this certificate or not. It looks like "keytool" did a validation and found that Maria's certificate was signed by a trusted certificate, herong_crt, in the keystore.

Want to see what's in the keystore file now? Try this "keytool -list" command:

C:\herong>keytool -list -keystore maria.jks -storepass jkspass

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 3 entries

maria_key, Apr 1, 2007, PrivateKeyEntry,
Certificate fingerprint (MD5): 54:5A:E8:77:30:82:B4:EB:C...
herong_crt, Apr 1, 2007, trustedCertEntry,
Certificate fingerprint (MD5): C1:6C:FE:38:F7:0F:71:23:3...
maria_crt, Apr 1, 2007, trustedCertEntry,
Certificate fingerprint (MD5): 5B:AB:DC:62:6E:F4:F4:96:5...

By now, Maria has everything she needs in her 'keystore' file to perform a digital signature on anything. Receiver of her digital signature can trust her signature, because I, as a CA, signed her certificate.

Table of Contents

 About This Book

 Cryptography Terminology

 Cryptography Basic Concepts

 Introduction to AES (Advanced Encryption Standard)

 Introduction to DES Algorithm

 DES Algorithm - Illustrated with Java Programs

 DES Algorithm Java Implementation

 DES Algorithm - Java Implementation in JDK JCE

 DES Encryption Operation Modes

 DES in Stream Cipher Modes

 PHP Implementation of DES - mcrypt

 Blowfish - 8-Byte Block Cipher

 Secret Key Generation and Management

 Cipher - Secret Key Encryption and Decryption

 Introduction of RSA Algorithm

 RSA Implementation using java.math.BigInteger Class

 Introduction of DSA (Digital Signature Algorithm)

 Java Default Implementation of DSA

 Private key and Public Key Pair Generation

 PKCS#8/X.509 Private/Public Encoding Standards

 Cipher - Public Key Encryption and Decryption

 MD5 Mesasge Digest Algorithm

 SHA1 Mesasge Digest Algorithm

 OpenSSL Introduction and Installation

 OpenSSL Generating and Managing RSA Keys

 OpenSSL Managing Certificates

 OpenSSL Generating and Signing CSR

 OpenSSL Validating Certificate Path

 "keytool" and "keystore" from JDK

"OpenSSL" Signing CSR Generated by "keytool"

 "OpenSSL" Acting as a CA (Certificate Authority)

 "OpenSSL" Generating CA's Private Key

 "OpenSSL" Self-Signing CA's Public Key

 "keytool" Generating Maria's Private Key

 "keytool" Generating Maria's CSR

 "OpenSSL" Signing Maria's CSR

 "OpenSSL" Managing Serial Numbers when Signing CSR

 "keytool" Importing CA's Own Certificate

""keytool" Importing Maria's Certificate Signed by CA

 Migrating Keys from "keystore" to "OpenSSL" Key Files

 Certificate X.509 Standard and DER/PEM Formats

 Migrating Keys from "OpenSSL" Key Files to "keystore"

 Using Certificates in IE

 Using Certificates in Google Chrome

 Using Certificates in Firefox

 Outdated Tutorials


 Full Version in PDF/EPUB