Files
android/libwvdrmengine/cdm/core/include/device_files.h
Jeff Tinker 958bbe6d05 Certificate provisioning verification
bug: 8620943

This is a merge of changes made to the Widevine CDM
repository during certificate provisioning verification.

The following changes are included:

Fixes for certificate based licensing
https://widevine-internal-review.googlesource.com/#/c/5162/

Base64 encode and decode now handles non-multiple of 24-bits input
https://widevine-internal-review.googlesource.com/#/c/4981/

Fixed issues with device provisioning response handling
https://widevine-internal-review.googlesource.com/#/c/5153/

Persistent storage to support device certificates
https://widevine-internal-review.googlesource.com/#/c/5161/

Enable loading of certificates
https://widevine-internal-review.googlesource.com/#/c/5172/

Provide license server url
https://widevine-internal-review.googlesource.com/#/c/5173/

Change-Id: I0c032c1ae0055dcc1a7a77ad4b0ea0898030dc7d
2013-04-22 20:12:03 -07:00

34 lines
993 B
C++

// Copyright 2013 Google Inc. All Rights Reserved.
//
#ifndef CDM_BASE_DEVICE_FILES_H_
#define CDM_BASE_DEVICE_FILES_H_
#include "wv_cdm_types.h"
namespace wvcdm {
class DeviceFiles {
public:
static bool StoreCertificate(const std::string& certificate,
const std::string& wrapped_private_key);
static bool RetrieveCertificate(std::string* certificate,
std::string* wrapped_private_key);
static std::string GetPath(const char* dir, const char * filename);
static const char* kBasePath;
static const char* kIdmPath;
static const char* kCencPath;
static const char* kDeviceCertificateFileName;
private:
static bool Hash(const std::string& data, std::string* hash);
static bool StoreFile(const char* name, const std::string& data);
static bool RetrieveFile(const char* name, std::string* data);
CORE_DISALLOW_COPY_AND_ASSIGN(DeviceFiles);
}; // namespace wvcdm
}
#endif // CDM_BASE_DEVICE_FILES_H_