OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "net/cert/ct_serialization.h" | 5 #include "net/cert/ct_serialization.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 // Bytes 10-17 are tree size | 252 // Bytes 10-17 are tree size |
253 // Bytes 18-49 are sha256 root hash | 253 // Bytes 18-49 are sha256 root hash |
254 ASSERT_EQ(50u, encoded.length()); | 254 ASSERT_EQ(50u, encoded.length()); |
255 std::string expected_buffer( | 255 std::string expected_buffer( |
256 "\x0\x1\x0\x0\x1\x45\x3c\x5f\xb8\x35\x0\x0\x0\x0\x0\x0\x0\x15", 18); | 256 "\x0\x1\x0\x0\x1\x45\x3c\x5f\xb8\x35\x0\x0\x0\x0\x0\x0\x0\x15", 18); |
257 expected_buffer.append(ct::GetSampleSTHSHA256RootHash()); | 257 expected_buffer.append(ct::GetSampleSTHSHA256RootHash()); |
258 ASSERT_EQ(expected_buffer, encoded); | 258 ASSERT_EQ(expected_buffer, encoded); |
259 } | 259 } |
260 | 260 |
261 } // namespace net | 261 } // namespace net |
262 | |
OLD | NEW |