Ask your AI Ask your AI to turn this code into a guided bug-finding exercise.
Claude ChatGPT I am reading "A certificate builds successfully to a trusted root but names only payments.example. What should a client requesting login.example do?" on CodeWiki (https://codewiki.com/practice/mcq/foundations/tls-connections/chain-and-name-separation/).
Context (verbatim from the page):
"""
A certificate builds successfully to a trusted root but names only payments.example. What should a client requesting login.example do?
Accept it because chain validation already authenticated every hostname.
Reject it because the trusted chain and requested service identity are separate checks.
Accept it only when both names resolve to the same IP address.
Retry with certificate verification disabled.
"""
Introduce three subtle bugs into the example above and let me find them. Reveal each answer only after I have guessed.
Answer in English. Keep code examples in CS foundations. Where you are unsure, say so.