Source release 18.1.0
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "FuzzedDataProvider.h"
|
||||
#include "OEMCryptoCENC.h"
|
||||
#include "oec_session_util.h"
|
||||
#include "oemcrypto_fuzz_helper.h"
|
||||
#include "oemcrypto_fuzz_structs.h"
|
||||
|
||||
@@ -50,11 +51,13 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
|
||||
// Select key and verify.
|
||||
wvoec::Session& session = license_api_fuzz.session();
|
||||
OEMCrypto_SelectKey(session.session_id(), session.license().keys[3].key_id,
|
||||
session.license().keys[3].key_id_length,
|
||||
fuzzed_structure.cipher_mode);
|
||||
OEMCrypto_Generic_Verify(session.session_id(), buffer.data(), buffer.size(),
|
||||
fuzzed_structure.algorithm, signature.data(),
|
||||
signature.size());
|
||||
std::vector<uint8_t> key_handle;
|
||||
wvoec::GetKeyHandleIntoVector(session.session_id(),
|
||||
session.license().keys[3].key_id,
|
||||
session.license().keys[3].key_id_length,
|
||||
fuzzed_structure.cipher_mode, key_handle);
|
||||
OEMCrypto_Generic_Verify(key_handle.data(), key_handle.size(), buffer.data(),
|
||||
buffer.size(), fuzzed_structure.algorithm,
|
||||
signature.data(), signature.size());
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user