"OpenSSL" Acting as a CA (Certificate Authority)

This section provides a tutorial example on how to prepare OpenSSL to be used as CA (Certificate Authority) to sign other people's CSR (Certificate Signing Request).

If I want to act as a CA (Certificate Authority), I must have a tool to sign other people's CSR (Certificate Signing Request). As we learned from previous chapters, "keytool" can not sign CSR. So I must use "OpenSSL" to act as a CA.

Here is a list of things I need to do with "OpenSSL" as a CA:

Let's check the "OpenSSL" installation first. If "OpenSSL" was installed at \local\GnuWin32\, the following command should report back the version number:

>\local\gnuwin32\bin\openssl version

OpenSSL 0.9.7c 30 Sep 2003

>set path=<old_path>;\local\gnuwin32\bin\

To save typing time, I added \local\gnuwin32\bin\ to the PATH environment variable as shown above.

Then look at the configuration file, openssl.cnf, which is needed only when I self-signing my CA public certificate. I can use the openssl.cnf as is without any changes. But if I want to put in my CA distinguished name information to save time when self-signing my CA public certificate, I can add these settings to openssl.cnf:

countryName_default             = CA
stateOrProvinceName_default     = HY State
localityName_default            = HY City
0.organizationName_default      = HY Company
organizationalUnitName_default  = HY Unit 
commonName_default              = Herong Yang
emailAddress_default            = herongyang.com

So I am ready to generated my CA private key as described in the next section.

Last update: 2013.

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 (Internet Explorer)

 Using Certificates in Firefox

 Using Certificates in Google Chrome

 Outdated Tutorials

 References

 PDF Printing Version