Courseiva
Security Engineering →easyMultiple Choice

CAS-004 Security Engineering Practice Question

A company wants to implement certificate pinning for its mobile application to prevent man-in-the-middle attacks. Which of the following is the BEST practice when implementing certificate pinning?

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

✓

Pin the public key of the server certificate

Pinning the public key rather than the entire certificate allows for certificate renewal without invalidating the pin.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Disable certificate pinning after the first successful connection

    Why it's wrong here

    Disabling pinning after the first connection removes the protection entirely for every subsequent session, leaving later connections open to man-in-the-middle interception. Pinning must remain enforced on every connection. The option is tempting as a way to avoid breaking the app during certificate rotation, but rotation should be handled by pinning a backup key instead.

  • ✗

    Pin the root CA certificate only

    Why it's wrong here

    Pinning only the root CA leaves the app trusting every certificate that CA issues, so a compromised or mis-issued intermediate defeats the pin. Pinning the leaf or public key narrows trust to the specific certificate. Root pinning is tempting because it survives certificate rotation, but that convenience sacrifices the granularity the attack prevention requires.

  • ✓

    Pin the public key of the server certificate

    Why this is correct

    Pinning the public key rather than the full certificate lets the app continue trusting the server after certificate renewal, provided the key pair is reused. This maintains man-in-the-middle protection while avoiding outages from routine certificate rotation.

  • ✗

    Pin the entire certificate chain

    Why it's wrong here

    Pinning the entire chain breaks whenever any intermediate or leaf certificate is renewed, forcing an app update; it also adds no security beyond pinning the leaf or public key. Pinning the leaf certificate or its public key is the recommended practise. Chain pinning is tempting because it appears thorough, yet it mainly creates operational fragility.

About these practice questions

Courseiva writes every CAS-005 question from scratch — 973 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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 CAS-005 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 CAS-005 exam.