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

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

Issue 2709523008: [Cast Channel] Add support for nonce challenge to Cast channel authentication. (Closed)
Patch Set: Rebase-only Created 3 years, 9 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_socket.h
diff --git a/extensions/browser/api/cast_channel/cast_socket.h b/extensions/browser/api/cast_channel/cast_socket.h
index 78a7bb0d5d8fa791e98b352b45acaa448e180341..9423a48940e9c0daa6feeed05f8ded269f5d475a 100644
--- a/extensions/browser/api/cast_channel/cast_socket.h
+++ b/extensions/browser/api/cast_channel/cast_socket.h
@@ -18,6 +18,7 @@
#include "base/timer/timer.h"
#include "extensions/browser/api/api_resource.h"
#include "extensions/browser/api/api_resource_manager.h"
+#include "extensions/browser/api/cast_channel/cast_auth_util.h"
#include "extensions/browser/api/cast_channel/cast_socket.h"
#include "extensions/browser/api/cast_channel/cast_transport.h"
#include "extensions/common/api/cast_channel.h"
@@ -156,6 +157,18 @@ class CastSocketImpl : public CastSocket {
const scoped_refptr<Logger>& logger,
uint64_t device_capabilities);
+ // For test-only.
+ // This constructor allows for setting a custom AuthContext.
+ CastSocketImpl(const std::string& owner_extension_id,
+ const net::IPEndPoint& ip_endpoint,
+ ChannelAuthType channel_auth,
+ net::NetLog* net_log,
+ const base::TimeDelta& connect_timeout,
+ bool keep_alive,
+ const scoped_refptr<Logger>& logger,
+ uint64_t device_capabilities,
+ const AuthContext& auth_context);
+
// Ensures that the socket is closed.
~CastSocketImpl() override;
@@ -322,6 +335,9 @@ class CastSocketImpl : public CastSocket {
// certificate is not yet fetched.
scoped_refptr<net::X509Certificate> peer_cert_;
+ // The challenge context for the current connection.
+ const AuthContext auth_context_;
+
// Reply received from the receiver to a challenge request.
std::unique_ptr<CastMessage> challenge_reply_;
« no previous file with comments | « extensions/browser/api/cast_channel/cast_message_util.cc ('k') | extensions/browser/api/cast_channel/cast_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698