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

Side by Side Diff: base/openssl_util.h

Issue 4777001: Implements encryptor_openssl.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix linux & win 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
« no previous file with comments | « base/crypto/symmetric_key.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
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 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 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 #ifndef BASE_OPENSSL_UTIL_H_ 5 #ifndef BASE_OPENSSL_UTIL_H_
6 #define BASE_OPENSSL_UTIL_H_ 6 #define BASE_OPENSSL_UTIL_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/tracked.h" 10 #include "base/tracked.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // buffer is not of sufficient size. 48 // buffer is not of sufficient size.
49 unsigned char min_sized_buffer_[MIN_SIZE]; 49 unsigned char min_sized_buffer_[MIN_SIZE];
50 50
51 DISALLOW_COPY_AND_ASSIGN(ScopedOpenSSLSafeSizeBuffer); 51 DISALLOW_COPY_AND_ASSIGN(ScopedOpenSSLSafeSizeBuffer);
52 }; 52 };
53 53
54 // Drains the OpenSSL ERR_get_error stack. On a debug build the error codes 54 // Drains the OpenSSL ERR_get_error stack. On a debug build the error codes
55 // are send to VLOG(1), on a release build they are disregarded. 55 // are send to VLOG(1), on a release build they are disregarded.
56 void ClearOpenSSLERRStack(); 56 void ClearOpenSSLERRStack();
57 57
58 // Put an instance of this class on the call stack to automatically clear the
59 // OpenSSL error stack on exit of your function.
60 class ScopedOpenSSLERRClearer {
61 public:
62 ScopedOpenSSLERRClearer() {}
63 ~ScopedOpenSSLERRClearer() { ClearOpenSSLERRStack(); }
64
65 private:
66 DISALLOW_COPY_AND_ASSIGN(ScopedOpenSSLERRClearer);
67 };
68
69 } // namespace base 58 } // namespace base
70 59
71 #endif // BASE_OPENSSL_UTIL_H_ 60 #endif // BASE_OPENSSL_UTIL_H_
OLDNEW
« no previous file with comments | « base/crypto/symmetric_key.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698