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

Side by Side Diff: base/openssl_util.cc

Issue 4691003: Implement symmetric key for openssl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix windows build Created 10 years, 1 month 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
« base/openssl_util.h ('K') | « base/openssl_util.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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/openssl_util.h"
6
7 #include <openssl/err.h>
8
9 #include "base/logging.h"
10
11 namespace base {
12
13 void ClearERRStack() {
14 if (logging::DEBUG_MODE && VLOG_IS_ON(1)) {
15 int error_num = ERR_get_error();
16 if (error_num == 0)
17 return;
18
19 DVLOG(1) << "OpenSSL ERR_get_error stack:";
20 char buf[140];
21 do {
22 ERR_error_string_n(error_num, buf, arraysize(buf));
23 DVLOG(1) << "\t" << error_num << ": " << buf;
24 error_num = ERR_get_error();
25 } while (error_num != 0);
26 } else {
27 ERR_clear_error();
28 }
29 }
30
31 } // namespace base
OLDNEW
« base/openssl_util.h ('K') | « base/openssl_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698