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

Unified Diff: net/tools/flip_server/spdy_ssl.cc

Issue 93793004: Format and Refactor Flip Server. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years 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: net/tools/flip_server/spdy_ssl.cc
diff --git a/net/tools/flip_server/spdy_ssl.cc b/net/tools/flip_server/spdy_ssl.cc
index 292bbe0eb0e882ed7c8326e17568027c53d4501b..14b5f42d5c1d151827364c4b59b9931fff87dfb3 100644
--- a/net/tools/flip_server/spdy_ssl.cc
+++ b/net/tools/flip_server/spdy_ssl.cc
@@ -13,12 +13,12 @@ namespace net {
#define NEXT_PROTO_STRING "\x06spdy/2\x08http/1.1\x08http/1.0"
#define SSL_CIPHER_LIST "!aNULL:!ADH:!eNull:!LOW:!EXP:RC4+RSA:MEDIUM:HIGH"
-int ssl_set_npn_callback(SSL *s,
- const unsigned char **data,
- unsigned int *len,
- void *arg) {
- VLOG(1) << "SSL NPN callback: advertising protocols.";
- *data = (const unsigned char *) NEXT_PROTO_STRING;
+int ssl_set_npn_callback(SSL* s,
+ const unsigned char** data,
+ unsigned int* len,
+ void* arg) {
+ VLOG(1) << "SSL NPN callback: advertising protocols.";
+ *data = (const unsigned char*)NEXT_PROTO_STRING;
*len = strlen(NEXT_PROTO_STRING);
return SSL_TLSEXT_ERR_OK;
}
@@ -51,9 +51,8 @@ void InitSSL(SSLState* state,
PrintSslError();
LOG(FATAL) << "Unable to use cert.pem as SSL cert.";
}
- if (SSL_CTX_use_PrivateKey_file(state->ssl_ctx,
- ssl_key_name.c_str(),
- SSL_FILETYPE_PEM) <= 0) {
+ if (SSL_CTX_use_PrivateKey_file(
+ state->ssl_ctx, ssl_key_name.c_str(), SSL_FILETYPE_PEM) <= 0) {
PrintSslError();
LOG(FATAL) << "Unable to use key.pem as SSL key.";
}
@@ -62,8 +61,8 @@ void InitSSL(SSLState* state,
LOG(FATAL) << "The cert.pem and key.pem files don't match";
}
if (use_npn) {
- SSL_CTX_set_next_protos_advertised_cb(state->ssl_ctx,
- ssl_set_npn_callback, NULL);
+ SSL_CTX_set_next_protos_advertised_cb(
+ state->ssl_ctx, ssl_set_npn_callback, NULL);
}
VLOG(1) << "SSL CTX default cipher list: " << SSL_CIPHER_LIST;
SSL_CTX_set_cipher_list(state->ssl_ctx, SSL_CIPHER_LIST);
@@ -80,7 +79,7 @@ void InitSSL(SSLState* state,
// Proper methods to disable compression don't exist until 0.9.9+. For now
// we must manipulate the stack of compression methods directly.
if (disable_ssl_compression) {
- STACK_OF(SSL_COMP) *ssl_comp_methods = SSL_COMP_get_compression_methods();
+ STACK_OF(SSL_COMP)* ssl_comp_methods = SSL_COMP_get_compression_methods();
int num_methods = sk_SSL_COMP_num(ssl_comp_methods);
int i;
for (i = 0; i < num_methods; i++) {
@@ -107,4 +106,3 @@ void PrintSslError() {
}
} // namespace net
-

Powered by Google App Engine
This is Rietveld 408576698