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.
Question
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)- A3% (1)
- B93% (28)
- C3% (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.
This command is missing the `new` subcommand, which is necessary to initiate the process of collecting information for and generating a new CSR.
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`.
There is no standard `openssl gencsr` subcommand; the correct command to generate a CSR is `openssl req`.
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
Community Discussion
No community discussion yet for this question.