Cryptography Tutorials - Herong's Tutorial Examples - v5.42, by Herong Yang
Generating CSR (Certificate Signing Request)
This section provides a tutorial example on how to use the 'keytool -certreq' command to generate a CSR (Certificate Signing Request) for the public key stored in a key entry.
In the third example, I want to generate a CSR (Certificate Signing Request) for the public key stored in key entry. The CSR can be then sent to a CA (Certificate Authority) and singed by the CA:
herong> keytool -certreq -alias my_home -keypass My1stKey \ -keystore herong.jks -storepass HerongJKS -file my_home.csr type my_home.csr -----BEGIN NEW CERTIFICATE REQUEST----- MIICcTCCAi4CAQAwbDELMAkGA1UEBhMCVVMxETAPBgNVBAgTCE15IFN0YXRlMRAwDg... eSBDaXR5MRAwDgYDVQQKEwdNeSBIb21lMRAwDgYDVQQLEwdNeSBVbml0MRQwEgYDVQ... bmcgWWFuZzCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQD9f1OBHXUSKVLfSpwu7OTn9h... Hj+AtlEmaUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3a5lQpaSfn+gEex... t8Yb+DtX58aophUPBPuD9tPFHsMCNVQTWhaRMvZ1864rYdcq7/IiAxmd0UgBxwIVAJ... spK5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jrqgvlXTAs9B4JnUV... cQcQgYC0SRZxI+hMKBYTt88JMozIpuE8FnqLVHyNKOCjrh4rs6Z1kW6jfwv6ITVi8f... 8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GEAAKBgEqtTokXJtvReDbz4k... c8g/SfJVaY+ZhTOa+H7aRKLzECRivEJe0uLEh8DNMPnZvbR3xVGdLNGOOCPXZt77QX... AFWmwqWYELhNVgN5d4gSREK+hUmWTkkb6zHyhVUkwSIy0WDJGRAfgI4RaKnWxQzgZX... KoZIzjgEAwUAAzAAMC0CFQCE8UhMAke7738nWDPG1GUIEncfiwIUZWRAW/PN+GGLH8... b2g= -----END NEW CERTIFICATE REQUEST-----
Table of Contents
Introduction to AES (Advanced Encryption Standard)
DES Algorithm - Illustrated with Java Programs
DES Algorithm Java Implementation
DES Algorithm - Java Implementation in JDK JCE
DES Encryption Operation Modes
PHP Implementation of DES - mcrypt
Blowfish - 8-Byte Block Cipher
Secret Key Generation and Management
Cipher - Secret Key Encryption and Decryption
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
OpenSSL Introduction and Installation
OpenSSL Generating and Managing RSA Keys
OpenSSL Generating and Signing CSR
OpenSSL Validating Certificate Path
►"keytool" and "keystore" from JDK
Certificates and Certificate Chains
Exporting and Import Certificates
►Generating CSR (Certificate Signing Request)
Cloning Certificates with New Identities
"OpenSSL" Signing CSR Generated by "keytool"
Migrating Keys from "keystore" to "OpenSSL" Key Files
Certificate X.509 Standard and DER/PEM Formats
Migrating Keys from "OpenSSL" Key Files to "keystore"