A CSR Is Not Your Private Key: Following a TLS Certificate Request
A certificate signing request (CSR) is a message you send to a certificate authority (CA) when you want it to issue a certificate. It is easy to confuse the request, the issued certificate and the private key because the
A certificate signing request (CSR) is a message you send to a certificate authority (CA) when you want it to issue a certificate. It is easy to confuse the request, the issued certificate and the private key because they all belong to the same workflow. They have different jobs.
The request
A CSR contains a public key and information requested for the certificate. The request is signed using the associated private key, which lets the CA verify the request was formed by someone with access to that key. In a typical web-server workflow, you send the CSR to the CA; you do not send the private key with it.
Keep track of where the key was created. If the key is lost, a certificate issued for its matching public key may not be usable by the server that needs it.
The issued certificate
After the CA completes its checks, it returns a signed certificate. Files may use extensions such as CER or CRT. That certificate is public material. It does not automatically carry the private key or prove that the right key exists on the target server.
Check the names on the issued certificate against the hostnames the service will use. Keep any CA-provided intermediate certificates with the change record, too; they are part of getting clients to build the issuing chain.
Why a PFX is different
A PFX (PKCS #12) can package a certificate and its corresponding private key, and may include additional certificates. That makes it useful when a Windows server needs to import the certificate and private key together. Protect the package with an import password and send that password through a separate channel.
Microsoft's certreq documentation describes certificate-request and key settings. Its Windows Server installation guide separates importing certificate material into the local computer store from assigning it to a website in IIS.
Keep browser preparation separate from server installation
A browser tool can help prepare a CSR or assemble certificate files, but that does not mean it has installed anything on a web server. Cloudek's certificate preparation tool is for creating and converting files; server import and IIS binding remain separate steps.
Before a change, write down the hostname, which key belongs to the request, where the private key is stored, which CA files were returned and which server will receive the PFX. After import, test the actual hostname from a client and confirm the expected certificate is presented.
The short version: share the CSR with the CA, protect the private key, treat the issued certificate as public, and make a PFX only when the installation path needs that package.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.