OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/webcrypto/jwk.h" | 5 #include "components/webcrypto/jwk.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include <set> | 9 #include <set> |
8 | 10 |
9 #include "base/base64url.h" | 11 #include "base/base64url.h" |
10 #include "base/json/json_reader.h" | 12 #include "base/json/json_reader.h" |
11 #include "base/json/json_writer.h" | 13 #include "base/json/json_writer.h" |
| 14 #include "base/macros.h" |
12 #include "base/stl_util.h" | 15 #include "base/stl_util.h" |
13 #include "base/strings/string_piece.h" | 16 #include "base/strings/string_piece.h" |
14 #include "base/strings/stringprintf.h" | 17 #include "base/strings/stringprintf.h" |
15 #include "components/webcrypto/algorithms/util.h" | 18 #include "components/webcrypto/algorithms/util.h" |
16 #include "components/webcrypto/crypto_data.h" | 19 #include "components/webcrypto/crypto_data.h" |
17 #include "components/webcrypto/status.h" | 20 #include "components/webcrypto/status.h" |
18 | 21 |
19 // JSON Web Key Format (JWK) is defined by: | 22 // JSON Web Key Format (JWK) is defined by: |
20 // http://tools.ietf.org/html/draft-ietf-jose-json-web-key | 23 // http://tools.ietf.org/html/draft-ietf-jose-json-web-key |
21 // | 24 // |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 utf8_bytes->assign(json.begin(), json.end()); | 382 utf8_bytes->assign(json.begin(), json.end()); |
380 } | 383 } |
381 | 384 |
382 Status GetWebCryptoUsagesFromJwkKeyOpsForTest( | 385 Status GetWebCryptoUsagesFromJwkKeyOpsForTest( |
383 const base::ListValue* key_ops, | 386 const base::ListValue* key_ops, |
384 blink::WebCryptoKeyUsageMask* usages) { | 387 blink::WebCryptoKeyUsageMask* usages) { |
385 return GetWebCryptoUsagesFromJwkKeyOps(key_ops, usages); | 388 return GetWebCryptoUsagesFromJwkKeyOps(key_ops, usages); |
386 } | 389 } |
387 | 390 |
388 } // namespace webcrypto | 391 } // namespace webcrypto |
OLD | NEW |