Linux_FoundationLinux_Foundation
LFCS · Question #425
LFCS Question #425: Real Exam Question with Answer & Explanation
The correct answer is A: openssl req new x509 key privkey.pem out cacert.pem days 365. A self-signed certificate can be generated using the openssl req command with the new and x509 options, specifying the private key and validity period.
Submitted by krish.m· Apr 18, 2026Service Configuration
Question
What openssl command will generate a selfsigned test certificate?
Options
- Aopenssl req new x509 key privkey.pem out cacert.pem days 365
- Bopenssl sign key privkey.pem out cacert.pem days 365
- Copenssl req key privkey.pem out cacert.pem days 365
- Dopenssl sign new x509 key privkey.pem out cacert.pem days 365
Explanation
A self-signed certificate can be generated using the openssl req command with the new and x509 options, specifying the private key and validity period.
Common mistakes.
- B. There is no standard
openssl signsubcommand for generating certificates; signing operations are typically handled byopenssl x509when acting as a CA, or byopenssl req -x509for self-signing. - C. This command is missing the crucial
-x509flag, which is required to instructopenssl reqto produce a self-signed certificate instead of a Certificate Signing Request (CSR). - D. This option uses the non-existent
openssl signsubcommand and incorrectly combinesnewwithx509in a non-standard syntax.
Concept tested. OpenSSL self-signed certificate generation
Reference. https://www.openssl.org/docs/manmaster/man1/req.html
Topics
#openssl#certificate generation#self-signed certificate#TLS/SSL
Community Discussion
No community discussion yet for this question.