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

Unified Diff: base/openssl_util.cc

Issue 4691003: Implement symmetric key for openssl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: missed a file 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 side-by-side diff with in-line comments
Download patch
« base/openssl_util.h ('K') | « base/openssl_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/openssl_util.cc
diff --git a/base/openssl_util.cc b/base/openssl_util.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f31906ab52716b04b27de1d3730e1f7388f1ff47
--- /dev/null
+++ b/base/openssl_util.cc
@@ -0,0 +1,30 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/logging.h"
+#include "base/openssl_util.h"
+
+#include <openssl/err.h>
+
+namespace base {
+
+void ClearERRStack() {
+ if (logging::DEBUG_MODE && VLOG_IS_ON(1)) {
+ int error_num = ERR_get_error();
+ if (error_num == 0)
+ return;
+
+ 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.
+ char buf[140];
+ do {
+ ERR_error_string_n(error_num, buf, arraysize(buf));
+ DVLOG(1) << "\t" << error_num << ": " << buf;
+ error_num = ERR_get_error();
+ } while (error_num != 0);
+ } else {
+ ERR_clear_error();
+ }
+}
+
+} // namespace base
« 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