This page provides a walkthrough of instructions in generating a Certificate Signing Request (CSR) with OpenSSL. Certificate creation needs this feature.
IMPORTANT: Switch to a working directory. Change your current location in a computer's file system to a specific folder where you intend to perform tasks, run scripts, or manage files. This action ensures that these subsequent commands are executed within that designated folder, preventing clutter and ensuring files are created or accessed in the correct location.
GNU/Linux & Mac OS X Users: Open a terminal and browse to a folder where you would like to generate your keypair.
Windows Users: Access the OpenSSL bin directory and open a command prompt in the same location.
Create a CSR configuration file:
Modify this files to your needs and save it as csr.conf
# Modify this files to your needs and save it as csr.conf
[req]
default_bits = 2048
distinguished_name = dn
default_md = sha256
prompt = no
req_extensions = req_ext
attributes = req_attributes
[dn]
O="{{YOUR_ORGANIZATION}}"
emailAddress="{{YOUR_DEVELOPER_PORTAL_EMAIL}}"
CN="{{YOUR_CN}}"
[req_ext]
extendedKeyUsage = clientAuth
basicConstraints = CA:FALSE
[req_attributes]
challengePassword = {{YOUR_SECRET_SENT_BY_CREATE_SECRET_BUTTON}}
| Field | Name | Requirement | Example |
|---|---|---|---|
| O | Organization Name | Entity's legal name | HBX Group |
| emailAddress | Email address | Your HBX Group Developer portal email | test@test.com |
| CN | Common Name | Domain or entity name. | www.hbxgroup.com |
| challengePassword | Challenge Passowrd | Secret generated by Create Secret button | L1ljxw2K |
Encrypted Private Key Syntax:
Generate a private key and CSR by running the following OpenSSL command, using the previously created csr.conf file.
openssl req -new -newkey rsa:2048 -keyout my_client-2.key -out my_client-2.csr -config csr.conf
IMPORTANT: You will need to provide a password when prompted. You need this password to access the private key, so make sure you store it safely.
You should now have the following files:
Both files can be opened using a standard plain‑text editor.