You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2018/02/08 03:57:54 UTC

[trafficserver] branch master updated: Correct clear and assign of FIPS cache keys in HTTPInfo.

This is an automated email from the ASF dual-hosted git repository.

jplevyak pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new b729070  Correct clear and assign of FIPS cache keys in HTTPInfo.
b729070 is described below

commit b729070a0c55ba886075757ab7354f584d10a8bc
Author: John Plevyak <--get-all>
AuthorDate: Tue Feb 6 13:18:44 2018 -0800

    Correct clear and assign of FIPS cache keys in HTTPInfo.
---
 proxy/hdrs/HTTP.cc | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/proxy/hdrs/HTTP.cc b/proxy/hdrs/HTTP.cc
index f0eac84..77d0a6e 100644
--- a/proxy/hdrs/HTTP.cc
+++ b/proxy/hdrs/HTTP.cc
@@ -1823,10 +1823,7 @@ HTTPCacheAlt::HTTPCacheAlt()
     m_frag_offsets(nullptr),
     m_ext_buffer(nullptr)
 {
-  m_object_key[0]  = 0;
-  m_object_key[1]  = 0;
-  m_object_key[2]  = 0;
-  m_object_key[3]  = 0;
+  memset(&m_object_key[0], 0, CRYPTO_HASH_SIZE);
   m_object_size[0] = 0;
   m_object_size[1] = 0;
 }
@@ -1853,13 +1850,10 @@ HTTPCacheAlt::copy(HTTPCacheAlt *to_copy)
 {
   m_magic = to_copy->m_magic;
   // m_writeable =      to_copy->m_writeable;
-  m_unmarshal_len  = to_copy->m_unmarshal_len;
-  m_id             = to_copy->m_id;
-  m_rid            = to_copy->m_rid;
-  m_object_key[0]  = to_copy->m_object_key[0];
-  m_object_key[1]  = to_copy->m_object_key[1];
-  m_object_key[2]  = to_copy->m_object_key[2];
-  m_object_key[3]  = to_copy->m_object_key[3];
+  m_unmarshal_len = to_copy->m_unmarshal_len;
+  m_id            = to_copy->m_id;
+  m_rid           = to_copy->m_rid;
+  memcpy(&m_object_key[0], &to_copy->m_object_key[0], CRYPTO_HASH_SIZE);
   m_object_size[0] = to_copy->m_object_size[0];
   m_object_size[1] = to_copy->m_object_size[1];
 

-- 
To stop receiving notification emails like this one, please contact
jplevyak@apache.org.