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

Side by Side Diff: net/tools/flip_server/spdy_ssl.cc

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "net/tools/flip_server/spdy_ssl.h" 5 #include "net/tools/flip_server/spdy_ssl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "openssl/err.h" 8 #include "openssl/err.h"
9 #include "openssl/ssl.h" 9 #include "openssl/ssl.h"
10 10
11 namespace net { 11 namespace net {
12 12
13 // Each element consists of <the length of the string><string> . 13 // Each element consists of <the length of the string><string> .
14 #define NEXT_PROTO_STRING \ 14 #define NEXT_PROTO_STRING \
15 "\x08spdy/4a2" \ 15 "\x08spdy/4a2" \
16 "\x06spdy/3" \ 16 "\x06spdy/3" \
17 "\x06spdy/2" \ 17 "\x06spdy/2" \
18 "\x08http/1.1" \ 18 "\x08http/1.1" \
19 "\x08http/1.0" 19 "\x08http/1.0"
20 #define SSL_CIPHER_LIST "!aNULL:!ADH:!eNull:!LOW:!EXP:RC4+RSA:MEDIUM:HIGH" 20 #define SSL_CIPHER_LIST "!aNULL:!ADH:!eNull:!LOW:!EXP:RC4+RSA:MEDIUM:HIGH"
21 21
22 int ssl_set_npn_callback(SSL* s, 22 int ssl_set_npn_callback(SSL* s,
23 const unsigned char** data, 23 const unsigned char** data,
24 unsigned int* len, 24 unsigned int* len,
25 void* arg) { 25 void* arg) {
26 VLOG(1) << "SSL NPN callback: advertising protocols."; 26 VLOG(1) << "SSL NPN callback: advertising protocols.";
27 *data = (const unsigned char*)NEXT_PROTO_STRING; 27 *data = (const unsigned char*)NEXT_PROTO_STRING;
28 *len = strlen(NEXT_PROTO_STRING); 28 *len = strlen(NEXT_PROTO_STRING);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 char buf[128]; // this buffer must be at least 120 chars long. 103 char buf[128]; // this buffer must be at least 120 chars long.
104 int error_num = ERR_get_error(); 104 int error_num = ERR_get_error();
105 while (error_num != 0) { 105 while (error_num != 0) {
106 ERR_error_string_n(error_num, buf, sizeof(buf)); 106 ERR_error_string_n(error_num, buf, sizeof(buf));
107 LOG(ERROR) << buf; 107 LOG(ERROR) << buf;
108 error_num = ERR_get_error(); 108 error_num = ERR_get_error();
109 } 109 }
110 } 110 }
111 111
112 } // namespace net 112 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698