OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/base/pem_tokenizer.h" | 5 #include "net/cert/pem_tokenizer.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
10 | 10 |
11 namespace { | 11 namespace { |
12 | 12 |
13 const char kPEMSearchBlock[] = "-----BEGIN "; | 13 const char kPEMSearchBlock[] = "-----BEGIN "; |
14 const char kPEMBeginBlock[] = "-----BEGIN %s-----"; | 14 const char kPEMBeginBlock[] = "-----BEGIN %s-----"; |
15 const char kPEMEndBlock[] = "-----END %s-----"; | 15 const char kPEMEndBlock[] = "-----END %s-----"; |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 allowed_block_types.begin(); it != allowed_block_types.end(); ++it) { | 96 allowed_block_types.begin(); it != allowed_block_types.end(); ++it) { |
97 PEMType allowed_type; | 97 PEMType allowed_type; |
98 allowed_type.type = *it; | 98 allowed_type.type = *it; |
99 allowed_type.header = base::StringPrintf(kPEMBeginBlock, it->c_str()); | 99 allowed_type.header = base::StringPrintf(kPEMBeginBlock, it->c_str()); |
100 allowed_type.footer = base::StringPrintf(kPEMEndBlock, it->c_str()); | 100 allowed_type.footer = base::StringPrintf(kPEMEndBlock, it->c_str()); |
101 block_types_.push_back(allowed_type); | 101 block_types_.push_back(allowed_type); |
102 } | 102 } |
103 } | 103 } |
104 | 104 |
105 } // namespace net | 105 } // namespace net |
OLD | NEW |