Source release v3.5.0
This commit is contained in:
Binary file not shown.
@@ -0,0 +1 @@
|
||||
(c020:0d112d7ea200;
|
||||
@@ -0,0 +1 @@
|
||||
(e2!0;u
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
0a4c08001248000000020000101907d9ffde13aa95c122678053362136bdf8408f8276e4c2d87ec52b61aa1b9f646e58734930acebe899b3e464189a14a87202fb02570640bd22ef44b2d7e3912250a230a14080112100915007caa9b5931b76a3a85f046523e10011a09393837363534333231180120002a0c313838363738373430350000
|
||||
@@ -0,0 +1 @@
|
||||
(2dea200;u
|
||||
@@ -0,0 +1 @@
|
||||
0a4c020:0d1190d79fef02570640bd22ef44b2d7e3912250a200
|
||||
@@ -0,0 +1 @@
|
||||
e2!0;u
|
||||
@@ -0,0 +1 @@
|
||||
e
|
||||
@@ -0,0 +1 @@
|
||||
(ea200;u
|
||||
@@ -0,0 +1 @@
|
||||
0a(c020:0d112d7ea200;
|
||||
@@ -0,0 +1 @@
|
||||
0a4c000000200:0101907d9ffde02570640bd22ef44b2d7e3912250a230a1407363534333231180120002a0c313838363738373430350000
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
0a4c000000220:01019dd79fef02570640bd22ef44b2d7e3912250a200
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
e;
|
||||
@@ -0,0 +1 @@
|
||||
0a4c000000200:010197d9ffde02570640bd22ef44b2d7e3912250a230a1407363534333231180120002a0c313838363738373430350000
|
||||
@@ -0,0 +1 @@
|
||||
0a4c00000020000101907d9ffde02570640bd22ef44b2d7e3912250a230a14080112100915007caa9b5931b76a3a85f046523e10011a09393837363534333231180120002a0c313838363738373430350000
|
||||
@@ -0,0 +1 @@
|
||||
0a4c020:0d112d7e3912250a200;
|
||||
@@ -0,0 +1 @@
|
||||
0a4c08001248000000020000101907d9ffde02570640bd22ef44b2d7e3912250a230a14080112100915007caa9b5931b76a3a85f046523e10011a09393837363534333231180120002a0c313838363738373430350000
|
||||
@@ -0,0 +1 @@
|
||||
)
|
||||
@@ -0,0 +1 @@
|
||||
e2;
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
0a4c08001248000000020000101907d9ffde13aa95c122678053362136bdf8408f8276e4c2d87ec52b61aa1b9f646e58734930acebe899b3e464189a14a87202fb02574e70640bd22ef44b2d7e3912250a230a14080112100915007caa9b5931b76a3a85f046523e10011a09393837363534333231180120002a0c313838363738373430350000
|
||||
25
oemcrypto/test/fuzz_tests/oemcrypto_fuzztests.gyp
Normal file
25
oemcrypto/test/fuzz_tests/oemcrypto_fuzztests.gyp
Normal file
@@ -0,0 +1,25 @@
|
||||
# Copyright 2017 Google Inc. All Rights Reserved.
|
||||
#
|
||||
# Builds under the CDM ./build.py (target platform) build system
|
||||
# Refer to the distribution package's README for details.
|
||||
{
|
||||
'variables': {
|
||||
'oemcrypto_lib%': '',
|
||||
'oemcrypto_stubs%': '',
|
||||
'openssl_config%': 'system',
|
||||
'openssl_target%': '',
|
||||
},
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'wv_ce_cdm_oemcrypto_generate_signature_fuzz_test',
|
||||
'type': 'executable',
|
||||
'sources': [
|
||||
# The test runner and the testing device certificate.
|
||||
'oemcrypto_generate_signature.cc',
|
||||
],
|
||||
'includes': [
|
||||
'oemcrypto_fuzztests.gypi',
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
54
oemcrypto/test/fuzz_tests/oemcrypto_fuzztests.gypi
Normal file
54
oemcrypto/test/fuzz_tests/oemcrypto_fuzztests.gypi
Normal file
@@ -0,0 +1,54 @@
|
||||
# Copyright 2017 Google Inc. All Rights Reserved.
|
||||
#
|
||||
# Include this in any custom unit test targets.
|
||||
# Does not include the test runner main.
|
||||
{
|
||||
'sources': [
|
||||
'../oec_device_features.cpp',
|
||||
'../oec_session_util.cpp',
|
||||
'../oemcrypto_session_tests_helper.cpp',
|
||||
'../oemcrypto_session_tests_helper.h',
|
||||
'../../../cdm/test/device_cert.cpp',
|
||||
'../../../cdm/test/device_cert.h',
|
||||
],
|
||||
'include_dirs': [
|
||||
'../../../core/include', # log.h
|
||||
'../../include',
|
||||
'../../mock/src', # oemcrypto_key_mock.h
|
||||
'../',
|
||||
'../../../cdm/test',
|
||||
],
|
||||
'defines': [
|
||||
'OEMCRYPTO_TESTS',
|
||||
'OEMCRYPTO_FUZZ_TESTS',
|
||||
],
|
||||
'libraries': [
|
||||
'../../../third_party/fuzz/platforms/x86-64/libFuzzer.a',
|
||||
'-lpthread', # gtest
|
||||
],
|
||||
'dependencies': [
|
||||
'../../../cdm/cdm.gyp:widevine_ce_cdm_shared',
|
||||
'../../../third_party/gmock.gyp:gmock',
|
||||
'../../../third_party/gmock.gyp:gtest',
|
||||
],
|
||||
'conditions': [
|
||||
['oemcrypto_stubs!=""', {
|
||||
'dependencies': [
|
||||
'../../stubs/stubs.gyp:oec_stubs_v<(oemcrypto_version)',
|
||||
],
|
||||
}, {
|
||||
'conditions': [
|
||||
['oemcrypto_lib==""', {
|
||||
'dependencies': [
|
||||
'../../mock/oec_mock.gyp:oec_mock',
|
||||
],
|
||||
}, {
|
||||
'libraries': [
|
||||
'../../../third_party/fuzz/platforms/x86-64/libFuzzer.a',
|
||||
'<(oemcrypto_lib)',
|
||||
],
|
||||
}],
|
||||
],
|
||||
}],
|
||||
],
|
||||
}
|
||||
38
oemcrypto/test/fuzz_tests/oemcrypto_generate_signature.cc
Normal file
38
oemcrypto/test/fuzz_tests/oemcrypto_generate_signature.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
#include "properties.h"
|
||||
#include "oemcrypto_session_tests_helper.h"
|
||||
|
||||
using namespace wvoec;
|
||||
|
||||
static bool is_init = false;
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
SessionUtil session_helper;
|
||||
if (!is_init) {
|
||||
bool is_cast_receiver = false;
|
||||
bool force_load_test_keybox = false;
|
||||
wvoec::global_features.Initialize(is_cast_receiver, force_load_test_keybox);
|
||||
wvoec::global_features.RestrictFilter("*");
|
||||
wvcdm::Properties::Init();
|
||||
is_init = true;
|
||||
}
|
||||
|
||||
OEMCrypto_Initialize();
|
||||
session_helper.EnsureTestKeys();
|
||||
|
||||
Session s;
|
||||
s.open();
|
||||
s.GenerateDerivedKeysFromKeybox();
|
||||
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
# Copyright 2017 Google Inc. All rights reserved.
|
||||
{
|
||||
# Here you can set platform-specific compiler settings.
|
||||
'target_defaults': {
|
||||
# These are flags passed to the compiler for all C & C++ files.
|
||||
'cflags': [
|
||||
'-fsanitize=address',
|
||||
'-fsanitize-coverage=trace-pc-guard',
|
||||
'-fPIC',
|
||||
],
|
||||
|
||||
# These are flags passed to the compiler for plain C only.
|
||||
'cflags_c': [
|
||||
'-fsanitize-coverage=trace-pc-guard',
|
||||
'-fsanitize=address',
|
||||
'-fPIC',
|
||||
],
|
||||
|
||||
# These are flags passed to the compiler for C++ only.
|
||||
'cflags_cc': [
|
||||
'-fsanitize-coverage=trace-pc-guard',
|
||||
'-fsanitize=address',
|
||||
'-fPIC',
|
||||
],
|
||||
|
||||
# These are flags passed to the linker.
|
||||
'ldflags': [
|
||||
'-fsanitize=address',
|
||||
],
|
||||
|
||||
# These are macros set by the compiler.
|
||||
'defines': [
|
||||
#'EXAMPLE_MACRO_WITH_NO_VALUE',
|
||||
#'EXAMPLE_KEY=EXAMPLE_VALUE',
|
||||
],
|
||||
|
||||
# These are additional include paths to search for headers.
|
||||
'include_dirs': [
|
||||
],
|
||||
|
||||
'target_conditions': [
|
||||
['_toolset == "host"', {
|
||||
# These are settings specifically for the host toolchain.
|
||||
# The extra equals sign in the key name instructs gyp to replace
|
||||
# the generic settings above rather than append to them.
|
||||
'cflags=': [
|
||||
'-fsanitize-coverage=trace-pc-guard',
|
||||
'-fsanitize=address',
|
||||
'-fPIC',
|
||||
],
|
||||
|
||||
'cflags_c=': [
|
||||
'-fsanitize-coverage=trace-pc-guard',
|
||||
'-fsanitize=address',
|
||||
'-fPIC',
|
||||
],
|
||||
|
||||
'cflags_cc=': [
|
||||
'-fsanitize-coverage=trace-pc-guard',
|
||||
'-fsanitize=address',
|
||||
'-fPIC',
|
||||
],
|
||||
|
||||
'ldflags=': [
|
||||
'-fsanitize=address',
|
||||
],
|
||||
|
||||
'defines=': [
|
||||
],
|
||||
|
||||
'include_dirs=': [
|
||||
],
|
||||
}], # end _toolset == "host" condition
|
||||
], # end target_conditions
|
||||
}, # end target_defaults
|
||||
}
|
||||
10
oemcrypto/test/fuzz_tests/sample_test.cc
Normal file
10
oemcrypto/test/fuzz_tests/sample_test.cc
Normal file
@@ -0,0 +1,10 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
if (size > 0 && data[0] == 'H')
|
||||
if (size > 1 && data[1] == 'I')
|
||||
if (size > 2 && data[2] == '!')
|
||||
__builtin_trap();
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user