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

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

Issue 2303673004: Hook up Chrome Cast sender to Cast CRL. (Closed)
Patch Set: Update logger.cc to surface errors. Created 4 years, 2 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..95715b0e45a5d02900572bbe11295a9eef570e01 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 {
@@ -36,10 +42,11 @@ struct AuthResult {
ERROR_CERT_NOT_SIGNED_BY_TRUSTED_CA,
ERROR_CANNOT_EXTRACT_PUBLIC_KEY,
ERROR_SIGNED_BLOBS_MISMATCH,
- ERROR_UNEXPECTED_AUTH_LIBRARY_RESULT,
- ERROR_VALIDITY_PERIOD_TOO_LONG,
- ERROR_VALID_START_DATE_IN_FUTURE,
- ERROR_CERT_EXPIRED,
+ ERROR_TLS_CERT_VALIDITY_PERIOD_TOO_LONG,
+ ERROR_TLS_CERT_VALID_START_DATE_IN_FUTURE,
+ ERROR_TLS_CERT_EXPIRED,
+ ERROR_CRL_INVALID,
+ ERROR_CERT_REVOKED,
};
enum PolicyType { POLICY_NONE = 0, POLICY_AUDIO_ONLY = 1 << 0 };
@@ -73,6 +80,18 @@ 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& verification_time);
+
} // namespace cast_channel
} // namespace api
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698