Name Constraints and Certificate Extensions
What you'll learn: How special certificate extensions restrict where and how a certificate can be used.
What Are Certificate Extensions?
X.509 certificates can include extensions that add rules beyond the basic "who holds this public key" information. Think of extensions as special clauses in a contract that limit what the certificate holder can and cannot do.
Name Constraints Extension
Name Constraints are like property boundaries for intermediate CA certificates. When a CA issues an intermediate certificate with name constraints, it's saying "you can only issue certificates for these specific domains or organizations—nothing else."
Example scenario: A company CA might issue an intermediate certificate to its European division with a name constraint limiting issuance to *.eu.company.com. That intermediate CA physically cannot issue valid certificates for us.company.com—validators will reject them.
This prevents CA compromise from becoming catastrophic. Even if the European intermediate is hacked, attackers can't issue certificates for the entire internet.
Key Usage Extension
The Key Usage extension specifies what cryptographic operations a certificate's key can perform:
digitalSignature- signing datakeyEncipherment- encrypting symmetric keys (RSA)keyCertSign- signing other certificates (CA certificates)cRLSign- signing certificate revocation lists
Extended Key Usage Extension
Extended Key Usage (EKU) goes further, specifying application-level purposes:
serverAuth- TLS/SSL server certificatesclientAuth- TLS/SSL client certificatescodeSigning- signing softwareemailProtection- S/MIME email encryption
A certificate marked for serverAuth only should be rejected if presented for code signing, even if the signature is mathematically valid.
Key Takeaway: Certificate extensions like name constraints, key usage, and extended key usage create guardrails that prevent certificates from being misused outside their intended scope, reducing the damage from compromise or misuse.