01The request, not the certificate
You never send your private key to a CA. You send a certificate signing request (CSR). A CSR contains your public key, the names you want on the certificate, and a signature made with your private key proving that you hold it.
- 1
Generate the key pair locally
On the server, or in an HSM, so the private key never exists elsewhere.
- 2
Build the CSR
Public key plus requested subject and SANs, signed with the private key.
- 3
Send the CSR to the CA
Only public information travels.
- 4
CA validates the request
It checks the signature, the names, and — depending on the product — the organisation behind them.
- 5
CA issues the certificate
The CA signs your public key and requested names into a new certificate.
openssl req -new -newkey rsa:3072 -nodes -keyout server.key -out server.csr \
-subj "/CN=shop.example.com" -addext "subjectAltName=DNS:shop.example.com,DNS:www.example.com"
openssl req -in server.csr -noout -text