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

Unified Diff: base/openssl_util.h

Issue 4691003: Implement symmetric key for openssl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: wtc comments 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
« no previous file with comments | « base/crypto/symmetric_key_unittest.cc ('k') | base/openssl_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/openssl_util.h
diff --git a/base/openssl_util.h b/base/openssl_util.h
index 4f564cf6c23b35173ccabc2400010371691d36b7..a3f64d4daf0040286f1a8a62c5ca9b095e99eb59 100644
--- a/base/openssl_util.h
+++ b/base/openssl_util.h
@@ -2,11 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BASE_OPENNSSL_UTIL_H_
-#define BASE_OPENNSSL_UTIL_H_
+#ifndef BASE_OPENSSL_UTIL_H_
+#define BASE_OPENSSL_UTIL_H_
#pragma once
#include "base/basictypes.h"
+#include "base/tracked.h"
namespace base {
@@ -46,8 +47,25 @@ class ScopedOpenSSLSafeSizeBuffer {
// Temporary buffer writen into in the case where the caller's
// buffer is not of sufficient size.
unsigned char min_sized_buffer_[MIN_SIZE];
+
+ DISALLOW_COPY_AND_ASSIGN(ScopedOpenSSLSafeSizeBuffer);
+};
+
+// Drains the OpenSSL ERR_get_error stack. On a debug build the error codes
+// are send to VLOG(1), on a release build they are disregarded.
+void ClearOpenSSLERRStack();
+
+// Put an instance of this class on the call stack to automatically clear the
+// OpenSSL error stack on exit of your function.
+class ScopedOpenSSLERRClearer {
+ public:
+ ScopedOpenSSLERRClearer() {}
+ ~ScopedOpenSSLERRClearer() { ClearOpenSSLERRStack(); }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ScopedOpenSSLERRClearer);
};
} // namespace base
-#endif // BASE_NSS_UTIL_H_
+#endif // BASE_OPENSSL_UTIL_H_
« no previous file with comments | « base/crypto/symmetric_key_unittest.cc ('k') | base/openssl_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698