Skip to content

Extension criticality in EE certificates #14173

@TaaviE

Description

@TaaviE

The current implementation in extensions.rs seems to apply the BR a bit inconsistent. I personally stumbled upon it erroring when EKU was marked as critical, which is allowed by RFC 5280 but N in the BR and marked as Criticality:NonCritical. At the same time subjectKeyIdentifier is N (and NOT RECOMMENDED) but marked as Criticality::Agnostic.

It's a bit unclear to me if N in the BR should mean Criticality::NonCritical or Criticality:Agnostic? What's the interpretation of pyca/cryptography?

It seems more reasonable to be Agnostic of criticality if it's allowed by RFC 5280 (and has a purpose) and NonCritical when an extension has been widely considered non-critical.

References

The tables in CA/B Forum TLS Server certificate BR currently specifies the following:

CA-Browser-Forum TLS BR 2.2.2:

7.1.2.7.6 Subscriber Certificate Extensions:

Extension Presence Critical Description
authorityInformationAccess MUST N See Section 7.1.2.7.7
authorityKeyIdentifier MUST N See Section 7.1.2.11.1
certificatePolicies MUST N See Section 7.1.2.7.9
extKeyUsage MUST N See Section 7.1.2.7.10
subjectAltName MUST * See Section 7.1.2.7.12
nameConstraints MUST NOT -
keyUsage SHOULD Y See Section 7.1.2.7.11
basicConstraints MAY Y See Section 7.1.2.7.8
crlDistributionPoints * N See Section 7.1.2.11.2
Signed Certificate Timestamp List MAY N See Section 7.1.2.11.3
subjectKeyIdentifier NOT RECOMMENDED N See Section 7.1.2.11.4
Any other extension NOT RECOMMENDED See Section 7.1.2.11.5

CA-Browser-Forum TLS BR 2.2.2:

7.1.2 Certificate Content and Extensions

If the CA asserts compliance with these Baseline Requirements, all certificates that it issues MUST
comply with one of the following certificate profiles, which incorporate, and are derived from RFC
5280.

RFC 5280:

   If a CA includes extended key usages to satisfy such applications,
   but does not wish to restrict usages of the key, the CA can include
   the special KeyPurposeId anyExtendedKeyUsage in addition to the
   particular key purposes required by the applications.  Conforming CAs
   SHOULD NOT mark this extension as critical if the anyExtendedKeyUsage
   KeyPurposeId is present.  Applications that require the presence of a
   particular purpose MAY reject certificates that include the
   anyExtendedKeyUsage OID but not the particular OID expected for the
   application.

extensions.rs:

            subject_key_identifier: ExtensionValidator::maybe_present(
                SUBJECT_KEY_IDENTIFIER_OID,
                Criticality::Agnostic,
                None,
            ),
[...]
            // CA/B: 7.1.2.7.10: Subscriber Certificate Extended Key Usage
            // NOTE: CABF requires EKUs in EE certs, while RFC 5280 does not.
            extended_key_usage: ExtensionValidator::maybe_present(
                EXTENDED_KEY_USAGE_OID,
                Criticality::NonCritical,
                Some(Arc::new(ee::extended_key_usage)),
            ),

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stalewaiting-on-reporterIssue is waiting on a reply from the reporter. It will be automatically cloesd if there is no reply.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions