Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1247)

Side by Side Diff: components/webcrypto/ec_import_key_pkcs8_fuzzer.cc

Issue 1743763003: Add fuzzers for import of WebCrypto DER-encoded keys. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 #include <vector>
8 7
9 #include "media/cdm/cenc_utils.h" 8 #include "components/webcrypto/fuzzer_support.h"
10 9
11 // Entry point for LibFuzzer. 10 // Entry point for LibFuzzer.
12 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { 11 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
13 std::vector<uint8_t> input(data, data + size); 12 webcrypto::ImportEcKeyFromDerFuzzData(data, size,
14 media::ValidatePsshInput(input); 13 blink::WebCryptoKeyFormatPkcs8);
15 return 0; 14 return 0;
16 } 15 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698