Remove unused OEMCrypto_GenerateSignature fuzzer
Merged from https://widevine-internal-review.googlesource.com/174772 Merged from https://widevine-internal-review.googlesource.com/176633 Merged from https://widevine-internal-review.googlesource.com/176634 Merged from https://widevine-internal-review.googlesource.com/176670 Change-Id: I36438c102bfe68ff16eab3db301377e858f533c1
This commit is contained in:
@@ -1,36 +0,0 @@
|
|||||||
#include "oemcrypto_fuzz_helper.h"
|
|
||||||
#include "oemcrypto_session_tests_helper.h"
|
|
||||||
#include "properties.h"
|
|
||||||
|
|
||||||
static bool is_init = false;
|
|
||||||
|
|
||||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
|
||||||
wvoec::SessionUtil session_helper;
|
|
||||||
if (!is_init) {
|
|
||||||
wvoec::RedirectStdoutToFile();
|
|
||||||
wvoec::global_features.Initialize();
|
|
||||||
wvoec::global_features.RestrictFilter("*");
|
|
||||||
wvutil::Properties::Init();
|
|
||||||
is_init = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
OEMCrypto_Initialize();
|
|
||||||
OEMCrypto_EnterTestMode();
|
|
||||||
session_helper.EnsureTestROT();
|
|
||||||
|
|
||||||
wvoec::Session s;
|
|
||||||
s.open();
|
|
||||||
s.GenerateDerivedKeysFromKeybox(session_helper.keybox_);
|
|
||||||
|
|
||||||
static const uint32_t SignatureBufferMaxLength = size;
|
|
||||||
vector<uint8_t> signature(SignatureBufferMaxLength);
|
|
||||||
size_t signature_length = signature.size();
|
|
||||||
|
|
||||||
OEMCryptoResult sts;
|
|
||||||
sts = OEMCrypto_GenerateSignature(s.session_id(), data, size,
|
|
||||||
&signature[0], &signature_length);
|
|
||||||
|
|
||||||
s.close();
|
|
||||||
OEMCrypto_Terminate();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user