OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "base/logging.h" | |
6 #include "base/openssl_util.h" | |
7 | |
8 #include <openssl/err.h> | |
9 | |
10 namespace base { | |
11 | |
12 void ClearERRStack() { | |
13 if (logging::DEBUG_MODE && VLOG_IS_ON(1)) { | |
14 int error_num = ERR_get_error(); | |
15 if (error_num == 0) | |
16 return; | |
17 | |
18 DVLOG(1) << "SSL error stack:"; | |
Ryan Sleevi
2010/11/11 18:07:15
nit: s/SSL/OpenSSL/
There is a separate SSL erro
joth
2010/11/11 19:54:36
Done.
| |
19 char buf[140]; | |
20 do { | |
21 ERR_error_string_n(error_num, buf, arraysize(buf)); | |
22 DVLOG(1) << "\t" << error_num << ": " << buf; | |
23 error_num = ERR_get_error(); | |
24 } while (error_num != 0); | |
25 } else { | |
26 ERR_clear_error(); | |
27 } | |
28 } | |
29 | |
30 } // namespace base | |
OLD | NEW |