Several updates to fuzz tests, including http://go/wvgerrit/124043 Add documentation for partners to run fuzzing http://go/wvgerrit/128224 Fix generic verify fuzz script http://go/wvgerrit/120507 Fuzzing: Add fuzzer for reportusage API http://go/wvgerrit/120503 Fuzzing: Add fuzzer for deactivate usageentry API http://go/wvgerrit/120463 Fuzzing: Add logic to exit fuzzer script http://go/wvgerrit/120444 Fuzzing: Add fuzzer for loadusageentry API Bug: 183154879 Bug: 202994773 Bug: 186785830 Test: test only code Change-Id: I877681461824c51bc82f0766a9973378aafadba7
73 lines
2.7 KiB
C++
73 lines
2.7 KiB
C++
// Copyright 2020 Google LLC. All Rights Reserved. This file and proprietary
|
|
// source code may only be used and distributed under the Widevine
|
|
// License Agreement.
|
|
#ifndef OEMCRYPTO_FUZZ_STRUCTS_H_
|
|
#define OEMCRYPTO_FUZZ_STRUCTS_H_
|
|
|
|
#include "core_message_types.h"
|
|
#include "odk.h"
|
|
|
|
namespace wvoec {
|
|
struct OEMCrypto_Renewal_Response_Fuzz {
|
|
// Timer limits in core license response needs to be fuzzed as load renewal
|
|
// depends on timer limits loaded from license response.
|
|
ODK_TimerLimits timer_limits;
|
|
// message(core_response + license_renewal_response) which mimics
|
|
// response from license renewal server needs to be fuzzed. core_request
|
|
// will be used to generate serialized core response.
|
|
oemcrypto_core_message::ODK_RenewalRequest core_request;
|
|
// Renewal duration seconds needs to be fuzzed which is part of serialized
|
|
// core message from license renewal server.
|
|
uint64_t renewal_duration_seconds;
|
|
// license_renewal_response is of variable length and not included in this
|
|
// structure.
|
|
};
|
|
|
|
struct OEMCrypto_Request_Fuzz {
|
|
// We would like to fuzz computed signature_length, input core_message_length
|
|
// that ODK parses and actual message buffer to the request APIs.
|
|
size_t signature_length;
|
|
size_t core_message_length;
|
|
// Request message is of variable length and not included in this structure.
|
|
};
|
|
|
|
struct OEMCrypto_Decrypt_Cenc_Fuzz {
|
|
// Corpus format is as below, let | be separator.
|
|
// cipher_mode + pattern + sample_data for all samples |
|
|
// subsample_data for all samples
|
|
OEMCryptoCipherMode cipher_mode;
|
|
OEMCrypto_CENCEncryptPatternDesc pattern;
|
|
// Sample data and subsample data are of variable length and not included in
|
|
// this structure.
|
|
};
|
|
|
|
struct OEMCrypto_Generic_Api_Fuzz {
|
|
// Corpus format is as below, let | be separator.
|
|
// cipher_mode + algorithm + iv | buffer with actual data
|
|
OEMCryptoCipherMode cipher_mode;
|
|
OEMCrypto_Algorithm algorithm;
|
|
// iv and buffer data are of variable length and not included in
|
|
// this structure.
|
|
};
|
|
|
|
struct OEMCrypto_Generic_Verify_Fuzz {
|
|
// Corpus format is as belowr.
|
|
// cipher_mode + algorithm + signature_length + buffer with actual data
|
|
OEMCryptoCipherMode cipher_mode;
|
|
OEMCrypto_Algorithm algorithm;
|
|
size_t signature_length;
|
|
// Buffer data is of variable length and not included in
|
|
// this structure.
|
|
};
|
|
|
|
struct OEMCrypto_Generate_RSA_Signature_Fuzz {
|
|
// Corpus format is as below, let | be separator.
|
|
// padding_scheme + signature_length + input buffer
|
|
RSA_Padding_Scheme padding_scheme;
|
|
size_t signature_length;
|
|
// input buffer data is of variable length and not included in
|
|
// this structure.
|
|
};
|
|
} // namespace wvoec
|
|
|
|
#endif // OEMCRYPTO_FUZZ_STRUCTS_H_
|