| Index: components/cast_certificate/cast_cert_validator.h
|
| diff --git a/components/cast_certificate/cast_cert_validator.h b/components/cast_certificate/cast_cert_validator.h
|
| index 1c335ae6530b446a86bf234d00ac39f5774a0c7f..df3cbc12a9bf9bbe03bb5cc6d2aabdc34b2099a1 100644
|
| --- a/components/cast_certificate/cast_cert_validator.h
|
| +++ b/components/cast_certificate/cast_cert_validator.h
|
| @@ -16,6 +16,8 @@
|
|
|
| namespace cast_certificate {
|
|
|
| +class CastCRL;
|
| +
|
| // Describes the policy for a Device certificate.
|
| enum class CastDeviceCertPolicy {
|
| // The device certificate is unrestricted.
|
| @@ -25,6 +27,13 @@ enum class CastDeviceCertPolicy {
|
| AUDIO_ONLY,
|
| };
|
|
|
| +struct CRLOptions {
|
| + // If set to false, then revocation is only checked if a CRL is provided.
|
| + // If set to true, then revocation is always checked. An empty CRL results
|
| + // in failure.
|
| + bool crl_required = true;
|
| +};
|
| +
|
| // An object of this type is returned by the VerifyDeviceCert function, and can
|
| // be used for additional certificate-related operations, using the verified
|
| // certificate.
|
| @@ -61,6 +70,14 @@ class CertVerificationContext {
|
| // * |time| is the UTC time to use for determining if the certificate
|
| // is expired.
|
| //
|
| +// * |crl| is the CRL to check for certificate revocation status.
|
| +// If this is a nullptr, then revocation checking is currently disabled.
|
| +//
|
| +//
|
| +// * |crl_options| is for choosing how to handle the absence of a CRL
|
| +// If crl_required is set to true, then an empty |crl| input would result
|
| +// in a failed verification. Otherwise, |crl| is ignored if it is absent.
|
| +//
|
| // Outputs:
|
| //
|
| // Returns true on success, false on failure. On success the output
|
| @@ -74,7 +91,9 @@ class CertVerificationContext {
|
| bool VerifyDeviceCert(const std::vector<std::string>& certs,
|
| const base::Time::Exploded& time,
|
| std::unique_ptr<CertVerificationContext>* context,
|
| - CastDeviceCertPolicy* policy) WARN_UNUSED_RESULT;
|
| + CastDeviceCertPolicy* policy,
|
| + const CastCRL* crl,
|
| + CRLOptions crl_options) WARN_UNUSED_RESULT;
|
|
|
| // Exposed only for unit-tests, not for use in production code.
|
| // Production code would get a context from VerifyDeviceCert().
|
|
|