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

Side by Side Diff: extensions/browser/api/cast_channel/cast_socket.cc

Issue 687733004: Implement crypto signature verification routines using OpenSSL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix const truncation warning (raised by Win builds.) Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "extensions/browser/api/cast_channel/cast_socket.h" 5 #include "extensions/browser/api/cast_channel/cast_socket.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 << *cert; 170 << *cert;
171 } 171 }
172 172
173 logger_->LogSocketEventWithRv( 173 logger_->LogSocketEventWithRv(
174 channel_id_, proto::DER_ENCODED_CERT_OBTAIN, result ? 1 : 0); 174 channel_id_, proto::DER_ENCODED_CERT_OBTAIN, result ? 1 : 0);
175 return result; 175 return result;
176 } 176 }
177 177
178 bool CastSocket::VerifyChallengeReply() { 178 bool CastSocket::VerifyChallengeReply() {
179 AuthResult result = AuthenticateChallengeReply(*challenge_reply_, peer_cert_); 179 AuthResult result = AuthenticateChallengeReply(*challenge_reply_, peer_cert_);
180 if (result.success()) {
181 VLOG(1) << result.error_message;
182 }
180 logger_->LogSocketChallengeReplyEvent(channel_id_, result); 183 logger_->LogSocketChallengeReplyEvent(channel_id_, result);
181 return result.success(); 184 return result.success();
182 } 185 }
183 186
184 void CastSocket::Connect(const net::CompletionCallback& callback) { 187 void CastSocket::Connect(const net::CompletionCallback& callback) {
185 DCHECK(CalledOnValidThread()); 188 DCHECK(CalledOnValidThread());
186 VLOG_WITH_CONNECTION(1) << "Connect readyState = " << ready_state_; 189 VLOG_WITH_CONNECTION(1) << "Connect readyState = " << ready_state_;
187 if (ready_state_ != READY_STATE_NONE) { 190 if (ready_state_ != READY_STATE_NONE) {
188 logger_->LogSocketEventWithDetails( 191 logger_->LogSocketEventWithDetails(
189 channel_id_, proto::CONNECT_FAILED, "ReadyState not NONE"); 192 channel_id_, proto::CONNECT_FAILED, "ReadyState not NONE");
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 } 880 }
878 881
879 CastSocket::WriteRequest::~WriteRequest() { 882 CastSocket::WriteRequest::~WriteRequest() {
880 } 883 }
881 884
882 } // namespace cast_channel 885 } // namespace cast_channel
883 } // namespace core_api 886 } // namespace core_api
884 } // namespace extensions 887 } // namespace extensions
885 888
886 #undef VLOG_WITH_CONNECTION 889 #undef VLOG_WITH_CONNECTION
OLDNEW
« no previous file with comments | « extensions/browser/api/cast_channel/cast_channel_apitest.cc ('k') | extensions/browser/api/cast_channel/logger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698