Browse Source

[3908] Addressed last comments

Francis Dupont 8 years ago
parent
commit
c14e40f952

+ 0 - 2
src/lib/cryptolink/botan_hmac.cc

@@ -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));

+ 3 - 9
src/lib/cryptolink/openssl_common.h

@@ -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) {}
 

+ 0 - 2
src/lib/cryptolink/openssl_hmac.cc

@@ -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));
     }