]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3908] Addressed last comments
authorFrancis Dupont <fdupont@isc.org>
Fri, 4 Nov 2016 17:33:10 +0000 (18:33 +0100)
committerFrancis Dupont <fdupont@isc.org>
Fri, 4 Nov 2016 17:33:10 +0000 (18:33 +0100)
src/lib/cryptolink/botan_hmac.cc
src/lib/cryptolink/openssl_common.h
src/lib/cryptolink/openssl_hmac.cc

index 27281f0cbc4f97800efb3cb17ffb34fd8cd77aa8..55360e94b2f2c937e87ea2f5c8ba3a9ae6bd4139 100644 (file)
@@ -194,8 +194,6 @@ public:
             if (digest_.empty()) {
                 digest_ = hmac_->final();
             }
-            // digest_.size() == size by construction
-            // if you are not convinced, add an assert()
             return (Botan::same_mem(&digest_[0],
                                     static_cast<const unsigned char*>(sig),
                                     len));
index fb19c9f2d66be8789760b9a6fd2581c0f7c02d75..a3e455699b6625c06079b5b01b54651b81b36cd0 100644 (file)
@@ -36,17 +36,11 @@ public:
 
     explicit SecBuf() : vec_(std::vector<T>()) {}
 
-    explicit SecBuf(size_t n, const T& value = T()) :
-        vec_(std::vector<T>(n, value))
-    {}
+    explicit SecBuf(size_t n, const T& value = T()) : vec_(n, value) {}
 
-    SecBuf(iterator first, iterator last) :
-        vec_(std::vector<T>(first, last))
-    {}
+    SecBuf(iterator first, iterator last) : vec_(first, last) {}
 
-    SecBuf(const_iterator first, const_iterator last) :
-        vec_(std::vector<T>(first, last))
-    {}
+    SecBuf(const_iterator first, const_iterator last) : vec_(first, last) {}
 
     SecBuf(const std::vector<T>& x) : vec_(x) {}
 
index 57ed066a75a3082433e533c403cc9d2a8b7c40bb..6d6a12967241a136a530741d66f6aa194632916d 100644 (file)
@@ -163,8 +163,6 @@ public:
         if (len > size) {
             len = size;
         }
-        // digest.size() == size by construction
-        // if you are not convinced, add an assert()
         return (digest.same(sig, len));
     }