OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/base64.h" | 5 #include "base/base64.h" |
6 #include "base/format_macros.h" | 6 #include "base/format_macros.h" |
7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
11 #include "base/stringprintf.h" | 11 #include "base/stringprintf.h" |
12 #include "base/time.h" | 12 #include "base/time.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "crypto/sha2.h" | 14 #include "crypto/sha2.h" |
15 #include "net/base/crl_set.h" | 15 #include "net/base/crl_set.h" |
16 | |
17 #if defined(USE_SYSTEM_ZLIB) | |
18 #include <zlib.h> | |
19 #else | |
20 #include "third_party/zlib/zlib.h" | 16 #include "third_party/zlib/zlib.h" |
21 #endif | |
22 | 17 |
23 namespace net { | 18 namespace net { |
24 | 19 |
25 // Decompress zlib decompressed |in| into |out|. |out_len| is the number of | 20 // Decompress zlib decompressed |in| into |out|. |out_len| is the number of |
26 // bytes at |out| and must be exactly equal to the size of the decompressed | 21 // bytes at |out| and must be exactly equal to the size of the decompressed |
27 // data. | 22 // data. |
28 static bool DecompressZlib(uint8* out, int out_len, base::StringPiece in) { | 23 static bool DecompressZlib(uint8* out, int out_len, base::StringPiece in) { |
29 z_stream z; | 24 z_stream z; |
30 memset(&z, 0, sizeof(z)); | 25 memset(&z, 0, sizeof(z)); |
31 | 26 |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 return new CRLSet; | 584 return new CRLSet; |
590 } | 585 } |
591 | 586 |
592 CRLSet* CRLSet::ExpiredCRLSetForTesting() { | 587 CRLSet* CRLSet::ExpiredCRLSetForTesting() { |
593 CRLSet* crl_set = new CRLSet; | 588 CRLSet* crl_set = new CRLSet; |
594 crl_set->not_after_ = 1; | 589 crl_set->not_after_ = 1; |
595 return crl_set; | 590 return crl_set; |
596 } | 591 } |
597 | 592 |
598 } // namespace net | 593 } // namespace net |
OLD | NEW |