Recommendations on use of X.509v3 extensions - Re: openssl x509 certificate question

"'David von Oheimb' via openssl-users" <[email protected]> Tue, 3 Feb 2026 09:53:50 +0100
Newsgroups gmane.comp.encryption.openssl.user
Message-ID <[email protected]>
On 03.02.26 08:28, Viktor Dukhovni wrote:
> On Mon, Feb 02, 2026 at 10:05:53PM -0800, SIMON BABY wrote:
>
>> Is this valid for root CA and intermediate CA certificate also ? Or only
>> valid for user certificate? . I am trying to understand if there is any
>> security concerns when there is no extensions in the certificate ?
> Depends on what you mean by "this"? :-)
>
> - CA certificates generally don't need or have EKU extensions.  If they
>    do have an EKU extension, then (rfc5280 notwithstanding) OpenSSL and
>    IIRC some other implementations interpret that extension as an
>    additional limitation on the usage of the EE key.  So skip the EKU
>    extension, or also list "clientAuth" if the CA is going to issue TLS
>    client certificates.
Right, and for maximal compatibility better not include the EKU 
extension in CA certs
(which as Viktor mentioned yesterday does not place any restriction 
w.r.t. extended key usage).

> - OpenSSL tolerates (implicitly) CA certificates that have neither a
>    basicConstraints nor a keyUsage extension, but this is not
>    recommended.

Yep.


>    A CA should have at least:
>
>      basicConstraints: CA:true, ...
>      keyUsage: keyCertSign, ...
>      subjectKeyIdentifiter: ...
>      authorityKeyIdentifiter: ...
For root CA certs (or other trust anchor certs) the AKID is needless, 
and so RFC 5280 section 4.2.1.1 
<https://www.rfc-editor.org/rfc/rfc5280.html#section-4.2.1.1> permits 
leaving it out (while requiring both SKID and AKID for all other cases 
in CA certs).
Generally, AKIDs and SKIDs should be included to help chain building 
between the EE cert and the trust anchor, while they do not affect the 
security of chain validation.
For EE certs the SKID is of course not needed for cert chain building, 
but still may be useful for identifying the signer of non-cert data (as 
used, e.g., in CMS and CMP).

Further extensions that may be helpful to have in all certs (except root 
/ trust anchor) are CDP 
<https://www.rfc-editor.org/rfc/rfc5280.html#section-4.2.1.13> and AIA 
<https://www.rfc-editor.org/rfc/rfc5280.html#section-4.2.2.1> entries 
providing info for revocation checking using CRLs or OCSP, respectively.

     David


-- 
You received this message because you are subscribed to the Google Groups "openssl-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openssl-users+unsubscribe-MCmKBN63+Bmbup2nOX2J7Q@public.gmane.org
To view this discussion visit https://groups.google.com/a/openssl.org/d/msgid/openssl-users/0ba112dd-2f5e-45fa-8b9f-79b87046057c%40von-Oheimb.de.