Courseiva
SecuritymediumMultiple ChoiceObjective-mapped

XK0-006 Security Practice Question

A technician needs to generate a self-signed certificate for an internal web server. Which OpenSSL command creates a new private key and a certificate signing request (CSR) in one step?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr

openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr creates both key and CSR.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • openssl req -x509 -newkey rsa:2048 -nodes -keyout server.key -out server.crt

    Why it's wrong here

    This creates a self-signed certificate, not a CSR.

  • openssl genrsa -out server.key 2048 && openssl req -new -key server.key -out server.csr

    Why it's wrong here

    This is two steps but also valid, but question asks for one step.

  • openssl ca -new -key server.key -out server.csr

    Why it's wrong here

    openssl ca is for CA operations, not generating CSR.

  • openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr

    Why this is correct

    One-step creation of key and CSR.

Quick reference

Asymmetric Encryption Algorithm Comparison

AlgorithmKey ExchangeSignaturesEquivalent Security KeyNotes
RSA-3072YesYes128-bitWidely deployed; slow for bulk data
ECDSA P-256NoYes128-bitFast signatures; standard TLS certs
ECDH / ECDHEYesNo128-bitPerfect forward secrecy in TLS 1.3
DH / DHEYesNo128-bit (3072-bit key)Replaced by ECDHE in modern TLS
Ed25519NoYes~128-bitSSH keys, modern PKI

About these practice questions

This XK0-006 question is part of Courseiva's 979-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.