Source release v3.5.0

This commit is contained in:
Gene Morgan
2017-11-28 17:42:16 -08:00
parent 501c22890d
commit 31381a1311
155 changed files with 16680 additions and 3816 deletions

View File

@@ -0,0 +1 @@
(c020:0d112d7ea200;

View File

@@ -0,0 +1 @@
0a4c08001248000000020000101907d9ffde13aa95c122678053362136bdf8408f8276e4c2d87ec52b61aa1b9f646e58734930acebe899b3e464189a14a87202fb02570640bd22ef44b2d7e3912250a230a14080112100915007caa9b5931b76a3a85f046523e10011a09393837363534333231180120002a0c313838363738373430350000

View File

@@ -0,0 +1 @@
0a4c020:0d1190d79fef02570640bd22ef44b2d7e3912250a200

View File

@@ -0,0 +1 @@
0a(c020:0d112d7ea200;

View File

@@ -0,0 +1 @@
0a4c000000200:0101907d9ffde02570640bd22ef44b2d7e3912250a230a1407363534333231180120002a0c313838363738373430350000

View File

@@ -0,0 +1 @@
0a4c000000220:01019dd79fef02570640bd22ef44b2d7e3912250a200

View File

@@ -0,0 +1 @@
0a4c000000200:010197d9ffde02570640bd22ef44b2d7e3912250a230a1407363534333231180120002a0c313838363738373430350000

View File

@@ -0,0 +1 @@
0a4c00000020000101907d9ffde02570640bd22ef44b2d7e3912250a230a14080112100915007caa9b5931b76a3a85f046523e10011a09393837363534333231180120002a0c313838363738373430350000

View File

@@ -0,0 +1 @@
0a4c020:0d112d7e3912250a200;

View File

@@ -0,0 +1 @@
0a4c08001248000000020000101907d9ffde02570640bd22ef44b2d7e3912250a230a14080112100915007caa9b5931b76a3a85f046523e10011a09393837363534333231180120002a0c313838363738373430350000

View File

@@ -0,0 +1 @@
0a4c08001248000000020000101907d9ffde13aa95c122678053362136bdf8408f8276e4c2d87ec52b61aa1b9f646e58734930acebe899b3e464189a14a87202fb02574e70640bd22ef44b2d7e3912250a230a14080112100915007caa9b5931b76a3a85f046523e10011a09393837363534333231180120002a0c313838363738373430350000

View 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',
],
},
],
}

View 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)',
],
}],
],
}],
],
}

View 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;
}

View File

@@ -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
}

View 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;
}