Create a SSL Certificate
About this task
How to create a SSL certificate
Applies to
All Versions and Systems
Procedure
On Linux with openssl tools installed
Step1: Prepare needed information
Information | Example |
---|---|
BVQ Server Hostname | bvq-server |
BVQ Server DNS name(s) | bvq-server.sva.de |
Password for key encryption | keypassword |
DNS address of your Certification Authority Server | ca-server.example.com |
Name of your Certification Authority | Name-of-CA |
Step1: Create a SSH Key .ini file for your BVQ Server
Create the .ini file in Folder /etc/pki/tls/certs/ e.g. by using vivi /etc/pki/tls/certs/bvq-server.ini
Insert the following text
Example openssl config (.ini) file
[ req ]
default_bits = 4096
default_md = sha256
prompt = no
encrypt_key = no
distinguished_name = req_distinguished_name
req_extensions = v3_req
x509_extensions = v3_ca
[ req_distinguished_name ]
C = DE
ST = Hessen
L = Wiesbaden
O = SVA GmbH
OU = IT-Administration / Monitoring
CN = 10.10.10.10
emailAddress = bvq@sva.de
[ v3_req ]
basicConstraints = CA:FALSE
keyUsage = digitalSignature, keyEncipherment
extendedKeyUsage = serverAuth
subjectAltName = @alt_names
[ v3_ca ]
basicConstraints = critical,CA:TRUE
keyUsage = digitalSignature, cRLSign, keyCertSign
subjectAltName = @alt_names
[ alt_names ]
IP.1 = 10.10.10.10
Important
In addition to the changes you need to make to adapt the .ini to your needs.
It may be necessary to enter DNS names
[ alt_names ]
IP.1 = 10.10.10.10
DNS.1 = example.com
DNS.2 = www.example.com
DNS.3 = subdomain.example.com
Step 2: Generate the openssl key and certificate request
Use command openssl to generate the key and ceritificate request file
after that insert a password into the blank to crypt your key (<PASWD> / "Privat Key Password")openssl command for key generation
[root@bvqdemo certs]# openssl req -newkey rsa:4096 -sha256 -days 365 -nodes -out /etc/pki/tls/certs/bvq-server.csr -keyout /etc/pki/tls/private/bvq-server.key -config /etc/pki/tls/certs/bvq-server.ini -passin stdin Ignoring -days; not generating a certificate <PASWD> Generating a RSA private key ..........++++ ...........................................................................................................................................................................................................................................................................................................................++++ writing new private key to '/etc/pki/tls/private/bvq-server.key'
Now two new files should appear
Resulting files of a successful openssl certificate generation
Step 3: Copy the files to your BVQ° Server
File | Example |
---|---|
Private Key file | bvq-server.key |
Certificate request file | bvq-server.csr |
Example copy session with MS PowerShell
Step 4: Generate the Certificate Request on your Windows BVQ° Server
Use the Windows command certreq to request a certificate from your Certification Authority Server. The following step depends on the PKI/CA used.
certreq command for .pem file generation
The bvq-server.crt
certificate file should appear in the current directory.
Step 5: Run the BVQ Server Installer
Now you should have these elements prepared:
Element | Example |
---|---|
Private key file | bvq-server.key |
CRT Certificate file | bvq-server.crt |
Password for key encryption | keypassword |
Insert all this in the related fields of the BVQ Server installer dialogue (see step 8 in the Installation guide).
Command explanation and additional information
Self Sign your own .csr
OpenSSL Command Components
Command Part | Meaning |
---|---|
| Command to invoke the OpenSSL toolkit, used for a wide range of cryptography tasks. |
| Stands for "PKCS#10 certificate request and certificate generating utility," used to create CSRs or self-signed certificates. |
| Creates a new RSA key of 4096 bits in length. |
| Generates a self-signed certificate instead of a certificate signing request. |
| Uses SHA-256 as the hashing algorithm for the certificate. |
| Sets the validity period of the certificate to 365 days. |
| Creates a private key without password protection. |
| Specifies the filename and path where the certificate or CSR will be saved. |
| Specifies the filename and path for the private key. |
| Specifies the path to the configuration file containing additional options. |
| Specifies how the password for accessing the private key or other encrypted data is entered. |
.ini Configuration Details
Configuration Entry | Meaning |
---|---|
| A section in the configuration file containing general settings for the certificate request. |
| The length of the key to generate in bits. |
| The default hashing algorithm for the signature. |
| Controls whether OpenSSL should ask interactively for the DN (Distinguished Name) fields. |
| Specifies whether the private key should be encrypted. |
| A section defining the DN fields for the certificate request. |
| Fields of the Distinguished Name specifying the country, state/province, locality, organization, organizational unit, common name, and email address. |
| Sections defining specific extensions for certificates. |
| Defines whether a certificate can act as a CA (Certificate Authority). |
| Specifies the purposes the key can be used for, such as digital signatures, key encipherment, etc. |
| Specifies extended purposes like server authentication ( |
| Allows specifying alternative names for the subject, including DNS names and IP addresses. |
| A section listing alternative names under which the server is accessible. |
Certificate Signing Request (CSR) Submission in Windows
Command | Meaning |
---|---|
| Command-line tool in Windows used for certificate requests, with the switch to submit the CSR. |
| Specifies the path to the CA where the CSR is submitted. The path consists of the CA server name and the CA name itself, separated by a backslash. |
| Specifies additional attributes for the request. Here, a specific certificate template attribute is used to indicate which template the CA should use to create the certificate. |
| The first path is the location of your CSR file, and the second path is where the signed certificate will be saved. |