aboutsummaryrefslogtreecommitdiff
path: root/src/pki/import_spec.json
blob: 198af1b642d061a46b91d9de1f984e60ca76f944 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
{
  "replacements": [
    {"match": "^#include \"base/supports_user_data.h\"",
     "replace": ""},
    {"match": ": public base::SupportsUserData",
     "replace": ""},
    {"match": "~Result\\(\\) override;",
     "replace": "~Result();"},
    {"match": "base::SupportsUserData",
     "replace": "void"},
    {"match": "^#include \"net/dns/dns_util.h\"",
     "replace": ""},
    {"match": "^#include \"base/gtest_prod_util.h\"",
     "replace": ""},
    {"match": "^#include \"base/pickle.h\"",
     "replace": ""},
    {"match": "^#include \"base/check.h\"",
     "replace": "#include \"fillins/check.h\""},
    {"match": "^#include \"base/notreached.h\"",
     "replace": ""},
    {"match": "^#include \"base/check_op.h\"",
     "replace": "#include \"fillins/check.h\""},
    {"match": "^#include \"net/base/hash_value.h\"",
     "replace": "#include \"fillins/hash_value.h\""},
    {"match": "^#include \"net/cert/x509_util.h\"",
     "replace": "#include \"fillins/x509_util.h\""},
    {"match": "^#include \"url/gurl.h\"",
     "replace": "#include \"webutil/url/url.h\""},
    {"match": "^#include \"build/build_config.h\"",
     "replace": ""},
    {"match": "^#include \"base/numerics/clamped_math.h\"",
     "replace": "#include \"fillins/clamped_math.h\""},
    {"match": "^#include \"base/numerics/safe_conversions.h\"",
     "replace": ""},
    {"match": "^#include \"net/base/net_export.h\"",
     "replace": ""},
    {"match": "^#include \"base/strings/string_util.h\"",
     "replace": "#include \"fillins/fillins_string_util.h\""},
    {"match": "^#include \"base/base_paths.h\"",
     "replace": "#include \"fillins/path_service.h\"",
     "using": ["bssl::fillins::PathService"]},
    {"match": "base::PathService",
     "replace": "bssl::fillins::PathService"},
    {"match": "base::ClampAdd",
     "replace": "bssl::fillins::ClampAdd"},
    {"match": "base::ClampMul",
     "replace": "bssl::fillins::ClampAdd"},
    {"match": "^#include \"base/files/file_util.h\"",
     "replace": "#include \"fillins/file_util.h\""},
    {"match": "^#include \"base/path_service.h\"",
     "replace": ""},
    {"match": "^#include \"crypto/openssl_util.h\"",
     "replace": "#include \"fillins/openssl_util.h\""},
    {"match": "\"net/data/",
     "replace": "\"testdata/"},
    {"match": "\"net/third_party/nist-pkits",
     "replace": "\"testdata/nist-pkits"},
    {"match": "^#include \"net/base/net_errors.h\"",
     "replace": "#include \"fillins/log.h\"\n#include \"fillins/net_errors.h\"\n"},
    {"match": "^#include \"net/test/test_certificate_data.h\"",
     "replace": "#include \"testdata/test_certificate_data.h\""},
    {"match": "^#include \"net/third_party/nist-pkits/pkits_testcases-inl.h\"",
     "replace": "#include \"testdata/nist-pkits/pkits_testcases-inl.h\""},
    {"match": "^#include \"base/sys_byteorder.h\"",
     "replace": "#include \"fillins/inet.h\""},
    {"match": "^#include \"base/third_party/icu/icu_utf.h\"",
     "replace": "#include \"fillins/utf_string_conversions.h\""},
    {"match": "^#include \"base/strings/utf_string_conversions.h\"",
     "replace": "#include \"fillins/utf_string_conversions.h\""},
    {"match": "^#include \"base/strings/utf_string_conversion_utils.h\"",
     "replace": ""},
    {"match": "^#include \"base/memory/ref_counted.h\"",
     "replace": "#include <memory>"},
    {"match": "^#include \"base/base64.h\"",
     "replace": "#include \"fillins/fillins_base64.h\""},
    {"match": "^#include \"base/strings/stringprintf.h\"",
     "replace": ""},
    {"match": "^#include \"third_party/boringssl/src/include/openssl/(.*).h\"",
     "replace": "#include <openssl/$1.h>"},
    {"match": "^#include \"net/cert/pki/",
     "replace": "#include \""},
    {"match": "^#include \"net/cert/",
     "replace": "#include \""},
    {"match": "^#include \"net/der/",
     "replace": "#include \""},
    {"match": "^#include \"net/",
     "replace": "#include \""},
    {"match": "^#include \"net_buildflags.h\"",
     "replace": ""},
    {"match": "^#include \"base/time/time.h\"",
     "replace": ""},
    {"match": "^#include \"base/strings/string_piece.h\"",
     "replace": "#include <string_view>\n"},
    {"match": "^#include \"testing/gtest/include/gtest/gtest.h\"",
     "replace": "#include <gtest/gtest.h>"},
    {"match": "^#include \"testing/gmock/include/gmock/gmock.h\"",
     "replace": "#include <gmock/gmock.h>"},
    {"match": "^#include \"base/containers/span.h\"",
     "replace": "#include <openssl/span.h>"},
    {"match": "^#include \"third_party/abseil-cpp/absl/types/optional.h\"",
     "replace": "#include <optional>"},
    {"match": "^#include \"base/containers/contains.h\"",
     "replace": ""},
    {"match": "LOG(ERROR)",
     "replace": "std::cerr"},
    {"match": "GURL",
     "replace": "URL",
     "include": "webutil/url/url.h"},
    {"match": "absl::nullopt",
     "replace": "std::nullopt" },
    {"match": "absl::optional",
     "replace": "std::optional" },
    {"match": "absl::make_optional",
     "replace": "std::make_optional" },
    {"match": "base::span",
     "replace": "bssl::Span" },
    {"match": "base::make_span",
     "replace": "bssl::MakeSpan" },
    {"match": "base::as_bytes",
     "replace": "fillins::as_bytes",
     "include": "fillins/bits.h"},
    {"match": "^namespace net {",
     "replace": "namespace bssl {"},
    {"match": "namespace net::([^ ]+) {",
     "replace": "namespace bssl::$1 {"},
    {"match": "NET_EXPORT_PRIVATE ",
     "replace": "OPENSSL_EXPORT ",
     "include": "fillins/openssl_util.h"},
    {"match": "NET_EXPORT ",
     "replace": "OPENSSL_EXPORT ",
     "include": "fillins/openssl_util.h"},
    {"match": "NOTREACHED\\(\\)",
     "replace": "abort(); //NOTREACHED" },
    {"match": "NOTREACHED_NORETURN\\(\\)",
     "replace": "abort(); //NOTREACHED_NORETURN" },
    {"match": "FRIEND_TEST_ALL_PREFIXES\\(.+;",
     "replace": ""},
    {"match": " NET_DER",
     "replace": " BSSL_DER"},
    {"match": " NET_CERT_PKI",
     "replace": " BSSL_PKI"},
    {"match": " NET_CERT",
     "replace": " BSSL_PKI"},
    {"match": "^using base::StringPiece;",
     "replace": ""},
    {"match": "base::StringPiece",
     "replace": "std::string_view"},
    {"match": "base::StartsWith\\(",
     "replace": "bssl::string_util::StartsWith(",
     "include": "string_util.h"},
    {"match": "base::StringPrintf",
     "replace": "absl::StrFormat",
     "include": "third_party/absl/strings/str_format.h"},
    {"match": "base::Base64Encode",
     "replace": "fillins::Base64Encode"},
    {"match": "base::Base64Decode",
     "replace": "fillins::Base64Decode"},
    {"match": "base::ReadFileToString",
     "replace": "fillins::ReadFileToString"},
    {"match": "base::CollapseWhitespaceASCII",
     "replace": "fillins::CollapseWhitespaceASCII"},
    {"match": "base::FilePath",
     "replace": "fillins::FilePath"},
    {"match": "base::DIR_SOURCE_ROOT",
     "replace": "fillins::DIR_SOURCE_ROOT"},
    {"match": "base::NetToHost16\\(",
     "replace": "ntohs("},
    {"match": "base::NetToHost32\\(",
     "replace": "ntohl("},
    { "match": "base_icu::UChar32",
      "replace": "uint32_t"},
    {"match": "base::WriteUnicodeCharacter\\(",
     "replace": "fillins::WriteUnicodeCharacter("},
    {"match": "base::IsAsciiAlpha\\(",
     "replace": "fillins::IsAsciiAlpha("},
    {"match": "scoped_refptr<",
     "replace": "std::shared_ptr<"},
    {"match": ": public base::RefCountedThreadSafe<.+>",
     "replace": ""},
    {"match": "friend class base::RefCountedThreadSafe<.+>;",
     "replace": ""},
    {"match": "\\bnet::",
     "replace": "bssl::"},
    {"match": "base::Time::Exploded",
     "replace": "fillins::Exploded",
     "include": "fillins/time.h"},
    {"match": "([a-zA-Z_0-9]+)\\.UTCExplode\\(&([^)]*)\\)",
     "replace": "fillins::UTCExplode($1, &$2)"},
    {"match": "net::ReadTestFileToString\\(",
     "replace": "ReadTestFileToString("},
    {"match": "base::Seconds\\(",
     "replace": "absl::Seconds("},
    {"match": "base::Time::UnixEpoch\\(",
     "replace": "absl::UnixEpoch("},
    {"match": "base::Time::FromUTCExploded\\(",
     "replace": "fillins::FromUTCExploded(",
     "include": "fillins/time.h"},
    {"match": "base::Time::Now\\(\\)",
     "replace": "absl::Now()"},
    {"match": "base::Time::Min\\(\\)",
     "replace": "absl::InfinitePast()"},
    {"match": "base::Time::Max\\(\\)",
     "replace": "absl::InfiniteFuture()"},
    {"match": "base::Time",
     "replace": "absl::Time",
     "include": "fillins/time.h"},
    {"match": "constexpr absl::Time",
     "replace": "const absl::Time"},
    {"match": "^  // Map from OID to ParsedExtension.$",
     "replace": "~ParsedCertificate();\n$0"},
    {"match": "^  ~ParsedCertificate\\(\\);$",
     "replace": "  "},
    {"match": "crypto::OpenSSLErrStackTracer",
     "replace": "fillins::OpenSSLErrStackTracer"},
    {"match": "\\(FROM_HERE\\)",
     "replace": ""},
    {"match": "([^a-zA-Z])StringPiece([^a-zA-Z])",
     "replace": "${1}std::string_view$2"},
    {"match": "crypto::kSHA256Length",
     "replace": "SHA256_DIGEST_LENGTH"},
    {"match": "raw_ptr<([^>]*)>",
     "replace": "$1 *"}
  ],
    "files": [
    "net/cert/asn1_util.h",
    "net/cert/asn1_util.cc",
    "net/cert/cert_status_flags.h",
    "net/cert/cert_status_flags_list.h",
    "net/cert/cert_verify_proc_blocklist.inc",
    "net/cert/pki/cert_error_id.cc",
    "net/cert/pki/cert_error_id.h",
    "net/cert/pki/cert_error_params.cc",
    "net/cert/pki/cert_error_params.h",
    "net/cert/pki/cert_errors.cc",
    "net/cert/pki/cert_errors.h",
    "net/cert/pki/certificate_policies.cc",
    "net/cert/pki/certificate_policies.h",
    "net/cert/pki/certificate_policies_unittest.cc",
    "net/cert/pki/cert_issuer_source.h",
    "net/cert/pki/cert_issuer_source_static.cc",
    "net/cert/pki/cert_issuer_source_static.h",
    "net/cert/pki/cert_issuer_source_static_unittest.cc",
    "net/cert/pki/cert_issuer_source_sync_unittest.h",
    "net/cert/pki/common_cert_errors.cc",
    "net/cert/pki/common_cert_errors.h",
    "net/cert/pki/crl.h",
    "net/cert/pki/crl.cc",
    "net/cert/pki/crl_unittest.cc",
    "net/cert/pki/crl_parse_crl_certificatelist_fuzzer.cc",
    "net/cert/pki/crl_parse_crl_tbscertlist_fuzzer.cc",
    "net/cert/pki/crl_parse_issuing_distribution_point_fuzzer.cc",
    "net/cert/pki/crl_getcrlstatusforcert_fuzzer.cc",
    "net/cert/pki/extended_key_usage.cc",
    "net/cert/pki/extended_key_usage.h",
    "net/cert/pki/extended_key_usage_unittest.cc",
    "net/cert/pki/general_names.h",
    "net/cert/pki/general_names.cc",
    "net/cert/pki/general_names_unittest.cc",
    "net/cert/pki/ip_util.h",
    "net/cert/pki/ip_util.cc",
    "net/cert/pki/ip_util_unittest.cc",
    "net/cert/pki/mock_signature_verify_cache.h",
    "net/cert/pki/mock_signature_verify_cache.cc",
    "net/cert/pki/name_constraints.cc",
    "net/cert/pki/name_constraints.h",
    "net/cert/pki/name_constraints_unittest.cc",
    "net/cert/pki/nist_pkits_unittest.cc",
    "net/cert/pki/nist_pkits_unittest.h",
    "net/cert/pki/ocsp.cc",
    "net/cert/pki/ocsp.h",
    "net/cert/pki/ocsp_parse_ocsp_cert_id_fuzzer.cc",
    "net/cert/pki/ocsp_parse_ocsp_response_data_fuzzer.cc",
    "net/cert/pki/ocsp_parse_ocsp_response_fuzzer.cc",
    "net/cert/pki/ocsp_parse_ocsp_single_response_fuzzer.cc",
    "net/cert/pki/ocsp_unittest.cc",
    "net/cert/pki/parse_authority_key_identifier_fuzzer.cc",
    "net/cert/pki/parse_certificate.cc",
    "net/cert/pki/parse_certificate.h",
    "net/cert/pki/parse_certificate_unittest.cc",
    "net/cert/pki/parsed_certificate.cc",
    "net/cert/pki/parsed_certificate.h",
    "net/cert/pki/parse_certificate_fuzzer.cc",
    "net/cert/pki/parsed_certificate_unittest.cc",
    "net/cert/pki/parse_crldp_fuzzer.cc",
    "net/cert/pki/parse_name.cc",
    "net/cert/pki/parse_name.h",
    "net/cert/pki/parse_name_unittest.cc",
    "net/cert/pki/path_builder.cc",
    "net/cert/pki/path_builder.h",
    "net/cert/pki/path_builder_pkits_unittest.cc",
    "net/cert/pki/path_builder_unittest.cc",
    "net/cert/pki/path_builder_verify_certificate_chain_unittest.cc",
    "net/cert/pki/revocation_util.h",
    "net/cert/pki/revocation_util.cc",
    "net/cert/pki/signature_algorithm.cc",
    "net/cert/pki/signature_algorithm.h",
    "net/cert/pki/signature_algorithm_unittest.cc",
    "net/cert/pki/simple_path_builder_delegate.cc",
    "net/cert/pki/simple_path_builder_delegate.h",
    "net/cert/pki/simple_path_builder_delegate_unittest.cc",
    "net/cert/pki/string_util.cc",
    "net/cert/pki/string_util_unittest.cc",
    "net/cert/pki/string_util.h",
    "net/cert/pki/signature_verify_cache.h",
    "net/cert/pki/test_helpers.cc",
    "net/cert/pki/test_helpers.h",
    "net/cert/pki/trust_store.cc",
    "net/cert/pki/trust_store_collection.cc",
    "net/cert/pki/trust_store_collection.h",
    "net/cert/pki/trust_store_collection_unittest.cc",
    "net/cert/pki/trust_store.h",
    "net/cert/pki/trust_store_in_memory.cc",
    "net/cert/pki/trust_store_in_memory.h",
    "net/cert/pki/verify_certificate_chain.cc",
    "net/cert/pki/verify_certificate_chain.h",
    "net/cert/pki/verify_certificate_chain_pkits_unittest.cc",
    "net/cert/pki/verify_certificate_chain_typed_unittest.h",
    "net/cert/pki/verify_certificate_chain_unittest.cc",
    "net/cert/pki/verify_name_match.cc",
    "net/cert/pki/verify_name_match.h",
    "net/cert/pki/verify_name_match_unittest.cc",
    "net/cert/pki/verify_name_match_fuzzer.cc",
    "net/cert/pki/verify_name_match_normalizename_fuzzer.cc",
    "net/cert/pki/verify_name_match_verifynameinsubtree_fuzzer.cc",
    "net/cert/pki/verify_signed_data.cc",
    "net/cert/pki/verify_signed_data.h",
    "net/cert/pki/verify_signed_data_unittest.cc",
    "net/cert/ocsp_revocation_status.h",
    "net/cert/ocsp_verify_result.h",
    "net/cert/ocsp_verify_result.cc",
    "net/cert/pem.cc",
    "net/cert/pem.h",
    "net/der/encode_values.cc",
    "net/der/encode_values.h",
    "net/der/encode_values_unittest.cc",
    "net/der/input.cc",
    "net/der/input.h",
    "net/der/input_unittest.cc",
    "net/der/parser.cc",
    "net/der/parser.h",
    "net/der/parser_unittest.cc",
    "net/der/parse_values.cc",
    "net/der/parse_values.h",
    "net/der/parse_values_unittest.cc",
    "net/der/tag.cc",
    "net/der/tag.h"
  ]
}