__einfo_error ( EINFO_EACCES_EMPTY )
#define EINFO_EACCES_EMPTY \
__einfo_uniqify ( EINFO_EACCES, 0x08, "Empty certificate chain" )
+#define EACCES_OCSP_REQUIRED \
+ __einfo_error ( EINFO_EACCES_OCSP_REQUIRED )
+#define EINFO_EACCES_OCSP_REQUIRED \
+ __einfo_uniqify ( EINFO_EACCES, 0x09, "OCSP check required" )
/** Certificate cache */
static LIST_HEAD ( x509_cache );
return -EACCES_PATH_LEN;
}
+ /* Fail if OCSP is required */
+ if ( cert->extensions.auth_info.ocsp.uri &&
+ ( ! cert->extensions.auth_info.ocsp.good ) ) {
+ DBGC ( cert, "X509 %p \"%s\" requires an OCSP check\n",
+ cert, cert->subject.name );
+ return -EACCES_OCSP_REQUIRED;
+ }
+
/* Calculate effective path length */
cert->path_remaining = ( issuer->path_remaining - 1 );
max_path_remaining = ( cert->extensions.basic.path_len + 1 );