Search code examples
x509ocsp

x509v3 Authority Info Access


Is the AuthorityInfoAccess field mandatory in x509v3? I have some certificates, and I'm trying to do OCSP verification, but they don't seem to have this field when I do

openssl x509 -in file.cer -inform DER -text -noout

I was wondering if it's not in that output does that mean it's not there?


Solution

  • Neither extension is mandatory. All they are technically optional. But some applications may require the presence of particular extensions.

    For example, for CA certificate it is required to have a Basic Constraints and KeyUsage extensions. Otherwise, the certificate would not be recognized as CA certificate. In addition, when creating X.509v3 certificates, it is a good practice to include Subject Key Identifier to simplify certificate binding in the chain by using key match.

    There are two cases when Authority Information Access (and CRL Distribution Points) should not be presented: in any self-signed certificates and OCSP signing certificates.

    As you are talking about OCSP certificate, there is no practical need in this extension, because all required information is elsewhere. For example, if target certificate and its OCSP response are signed by the same CA, existing target certificate's chain is reused. If OCSP uses delegated OCSP signing certificate, then delegated certificate's chain is included in the OCSP response directly.

    In practice, badly generated certificates doesn't contain Authority Information Access extension as well.