diff options
author | Francis Dupont <fdupont@isc.org> | 2015-06-22 14:19:49 +0200 |
---|---|---|
committer | Francis Dupont <fdupont@isc.org> | 2015-06-22 14:19:49 +0200 |
commit | 277912a7d6a37c28a305eb2f3731ccdf4b18fa64 (patch) | |
tree | c07405eb02b63884670074b1d323c6c9a43f0c5a /src/lib/cryptolink/openssl_common.h | |
parent | [3908] Added getHashAlgorithm() function (diff) | |
download | kea-277912a7d6a37c28a305eb2f3731ccdf4b18fa64.tar.xz kea-277912a7d6a37c28a305eb2f3731ccdf4b18fa64.zip |
[3908] Added a clear() function to SecBuf class
Diffstat (limited to 'src/lib/cryptolink/openssl_common.h')
-rw-r--r-- | src/lib/cryptolink/openssl_common.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/cryptolink/openssl_common.h b/src/lib/cryptolink/openssl_common.h index 0652037247..fb19c9f2d6 100644 --- a/src/lib/cryptolink/openssl_common.h +++ b/src/lib/cryptolink/openssl_common.h @@ -1,4 +1,4 @@ -// Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2014, 2015 Internet Systems Consortium, Inc. ("ISC") // // Permission to use, copy, modify, and/or distribute this software for any // purpose with or without fee is hereby granted, provided that the above @@ -78,6 +78,11 @@ public: vec_.resize(sz); }; + void clear() { + std::memset(&vec_[0], 0, vec_.capacity() * sizeof(T)); + vec_.clear(); + } + SecBuf& operator=(const SecBuf& x) { if (&x != *this) { vec_ = x.vec_; |