nerdexam
Linux_Foundation

LFCS · Question #424

What openssl command will generate a certificate signing request (CSR) using the private key file privkey.pem?

The correct answer is B. openssl req new key privkey.pem out cert.csr. To generate a Certificate Signing Request (CSR) with OpenSSL, the openssl req command is used, explicitly stating new to create a new request and key to specify the private key for signing.

Submitted by kwame.gh· Apr 18, 2026Essential Commands

Question

What openssl command will generate a certificate signing request (CSR) using the private key file privkey.pem?

Options

  • Aopenssl req key privkey.pem out cert.csr
  • Bopenssl req new key privkey.pem out cert.csr
  • Copenssl gencsr key privkey.pem out cert.csr
  • Dopenssl gencsr new key privkey.pem out cert.csr

How the community answered

(30 responses)
  • A
    3% (1)
  • B
    93% (28)
  • C
    3% (1)

Why each option

To generate a Certificate Signing Request (CSR) with OpenSSL, the `openssl req` command is used, explicitly stating `new` to create a new request and `key` to specify the private key for signing.

Aopenssl req key privkey.pem out cert.csr

This command is missing the `new` subcommand, which is necessary to initiate the process of collecting information for and generating a new CSR.

Bopenssl req new key privkey.pem out cert.csrCorrect

The `openssl req` command is used for creating and managing PKCS#10 Certificate Signing Requests. The `new` subcommand instructs OpenSSL to generate a new CSR by prompting for certificate details, and `key privkey.pem` specifies the private key file that will be used to sign the request, with the output directed to `cert.csr`.

Copenssl gencsr key privkey.pem out cert.csr

There is no standard `openssl gencsr` subcommand; the correct command to generate a CSR is `openssl req`.

Dopenssl gencsr new key privkey.pem out cert.csr

This option incorrectly uses the non-existent `gencsr` subcommand.

Concept tested: OpenSSL Certificate Signing Request (CSR) generation

Source: https://www.openssl.org/docs/manmaster/man1/req.html

Topics

#openssl#CSR generation#certificate management#security

Community Discussion

No community discussion yet for this question.

Full LFCS Practice