| OLD | NEW |
| 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 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 | 96 |
| 97 SSL* CreateSSLContext(SSL_CTX* ssl_ctx) { | 97 SSL* CreateSSLContext(SSL_CTX* ssl_ctx) { |
| 98 SSL* ssl = SSL_new(ssl_ctx); | 98 SSL* ssl = SSL_new(ssl_ctx); |
| 99 SSL_set_accept_state(ssl); | 99 SSL_set_accept_state(ssl); |
| 100 PrintSslError(); | 100 PrintSslError(); |
| 101 return ssl; | 101 return ssl; |
| 102 } | 102 } |
| 103 | 103 |
| 104 void PrintSslError() { | 104 void PrintSslError() { |
| 105 char buf[128]; // this buffer must be at least 120 chars long. | 105 char buf[128]; // this buffer must be at least 120 chars long. |
| 106 int error_num = ERR_get_error(); | 106 uint32_t error_num = ERR_get_error(); |
| 107 while (error_num != 0) { | 107 while (error_num != 0) { |
| 108 ERR_error_string_n(error_num, buf, sizeof(buf)); | 108 ERR_error_string_n(error_num, buf, sizeof(buf)); |
| 109 LOG(ERROR) << buf; | 109 LOG(ERROR) << buf; |
| 110 error_num = ERR_get_error(); | 110 error_num = ERR_get_error(); |
| 111 } | 111 } |
| 112 } | 112 } |
| 113 | 113 |
| 114 } // namespace net | 114 } // namespace net |
| OLD | NEW |