Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Unified Diff: extensions/browser/api/cast_channel/cast_auth_util.h

Issue 2303673004: Hook up Chrome Cast sender to Cast CRL. (Closed)
Patch Set: VerifyDeviceCertUsingCustomTrustStore and ParseAndVerifyCRLUsingCustomTrustStore Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/browser/api/cast_channel/cast_auth_util.h
diff --git a/extensions/browser/api/cast_channel/cast_auth_util.h b/extensions/browser/api/cast_channel/cast_auth_util.h
index 61f100792282c9e21e253b41b831142ae511234f..9a39ba9e6d8dd3323358078de23464cd85df3355 100644
--- a/extensions/browser/api/cast_channel/cast_auth_util.h
+++ b/extensions/browser/api/cast_channel/cast_auth_util.h
@@ -8,9 +8,15 @@
#include <string>
#include "base/memory/ref_counted.h"
+#include "base/time/time.h"
+
+namespace cast_certificate {
+enum class CRLPolicy;
+}
namespace net {
class X509Certificate;
+class TrustStore;
} // namespace net
namespace extensions {
@@ -40,6 +46,8 @@ struct AuthResult {
ERROR_VALIDITY_PERIOD_TOO_LONG,
ERROR_VALID_START_DATE_IN_FUTURE,
ERROR_CERT_EXPIRED,
+ ERROR_CRL_INVALID,
+ ERROR_CERT_REVOKED,
};
enum PolicyType { POLICY_NONE = 0, POLICY_AUDIO_ONLY = 1 << 0 };
@@ -73,6 +81,19 @@ AuthResult AuthenticateChallengeReply(const CastMessage& challenge_reply,
AuthResult VerifyCredentials(const AuthResponse& response,
const std::string& signature_input);
+// Exposed for testing only.
+//
+// Overloaded version of VerifyCredentials that allows modifying
+// the crl policy, trust stores, and verification times.
+AuthResult VerifyCredentialsForTest(
+ const AuthResponse& response,
+ const std::string& signature_input,
+ const cast_certificate::CRLPolicy& crl_policy,
+ net::TrustStore* cast_trust_store,
+ net::TrustStore* crl_trust_store,
+ const base::Time& cert_verification_time,
+ const base::Time& crl_verification_time);
+
} // namespace cast_channel
} // namespace api
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698