odk: core serialization structs & functions
odk directory copied from wvgerrit. branch oemcrypto-v16 commit 0c9a7dc Bug: 140758896 Test: odk_test Change-Id: I0c631f771b794468a63e4395f6b9c3b60a1dfd4f
This commit is contained in:
59
libwvdrmengine/oemcrypto/odk/kdo/include/oec_util_proto.h
Normal file
59
libwvdrmengine/oemcrypto/odk/kdo/include/oec_util_proto.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Copyright 2019 Google LLC. All Rights Reserved. This file and proprietary
|
||||
* source code may only be used and distributed under the Widevine Master
|
||||
* License Agreement.
|
||||
*/
|
||||
|
||||
/*********************************************************************
|
||||
* oec_util_proto.h
|
||||
*
|
||||
* These functions are an extension of those found in oec_util.h. The
|
||||
* difference is that these use the license and provisioning messages
|
||||
* in protobuf format to create the core message.
|
||||
*********************************************************************/
|
||||
|
||||
#ifndef OEC_UTIL_PROTO_H_
|
||||
#define OEC_UTIL_PROTO_H_
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
#include "license_protocol.pb.h"
|
||||
#include "oec_util.h"
|
||||
|
||||
using namespace std;
|
||||
using video_widevine::License;
|
||||
using video_widevine::License_KeyContainer;
|
||||
|
||||
namespace oec_util {
|
||||
|
||||
// @ public create response (serializer) functions
|
||||
|
||||
/**
|
||||
* Counterpart (serializer) of ODK_ParseLicense (deserializer)
|
||||
*
|
||||
* Parameters:
|
||||
* [in] license
|
||||
* [in] core_request
|
||||
* [out] oemcrypto_core_message
|
||||
*/
|
||||
bool CreateCoreLicenseResponse(const video_widevine::License& license,
|
||||
const ODK_LicenseRequest& core_request,
|
||||
string* oemcrypto_core_message);
|
||||
|
||||
/**
|
||||
* Counterpart (serializer) of ODK_ParseProvisioning (deserializer)
|
||||
*
|
||||
* Parameters:
|
||||
* [in] provisioning_response
|
||||
* [in] core_request
|
||||
* [out] oemcrypto_core_message
|
||||
*/
|
||||
bool CreateCoreProvisioningResponse(
|
||||
const video_widevine::ProvisioningResponse& provisioning_response,
|
||||
const ODK_ProvisioningRequest& core_request,
|
||||
string* oemcrypto_core_message);
|
||||
|
||||
} // namespace oec_util
|
||||
|
||||
#endif // OEC_UTIL_PROTO_H_
|
||||
Reference in New Issue
Block a user