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

Side by Side Diff: crypto/openssl_util.cc

Issue 1028873002: Use uint32_t to hold return values from ERR_get_error() and ERR_peek_error(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | net/cert/test_root_certs_openssl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "crypto/openssl_util.h" 5 #include "crypto/openssl_util.h"
6 6
7 #include <openssl/err.h> 7 #include <openssl/err.h>
8 #include <openssl/ssl.h> 8 #include <openssl/ssl.h>
9 #include <openssl/cpu.h> 9 #include <openssl/cpu.h>
10 10
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 } 109 }
110 110
111 } // namespace 111 } // namespace
112 112
113 void EnsureOpenSSLInit() { 113 void EnsureOpenSSLInit() {
114 (void)OpenSSLInitSingleton::GetInstance(); 114 (void)OpenSSLInitSingleton::GetInstance();
115 } 115 }
116 116
117 void ClearOpenSSLERRStack(const tracked_objects::Location& location) { 117 void ClearOpenSSLERRStack(const tracked_objects::Location& location) {
118 if (logging::DEBUG_MODE && VLOG_IS_ON(1)) { 118 if (logging::DEBUG_MODE && VLOG_IS_ON(1)) {
119 int error_num = ERR_peek_error(); 119 uint32_t error_num = ERR_peek_error();
120 if (error_num == 0) 120 if (error_num == 0)
121 return; 121 return;
122 122
123 std::string message; 123 std::string message;
124 location.Write(true, true, &message); 124 location.Write(true, true, &message);
125 DVLOG(1) << "OpenSSL ERR_get_error stack from " << message; 125 DVLOG(1) << "OpenSSL ERR_get_error stack from " << message;
126 ERR_print_errors_cb(&OpenSSLErrorCallback, NULL); 126 ERR_print_errors_cb(&OpenSSLErrorCallback, NULL);
127 } else { 127 } else {
128 ERR_clear_error(); 128 ERR_clear_error();
129 } 129 }
130 } 130 }
131 131
132 } // namespace crypto 132 } // namespace crypto
OLDNEW
« no previous file with comments | « no previous file | net/cert/test_root_certs_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698