Changes include: 1. Fix refreshkeys when handling renewal response. 2. Change ECM start detect method. 3. Fix signing key truncation. 4. Reformat C++ code. 5. Return license_id in LICENSE_CAS_READY payload. 6. Expose OEMCrypto API version in the license request. 7. Add support for newly added widevine cas ids. 8. Store content iv and encryption mode info to entitled key. 9. Upgrade ODK library to 16.4.
54 lines
1.4 KiB
C++
54 lines
1.4 KiB
C++
// Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
|
|
// source code may only be used and distributed under the Widevine Master
|
|
// License Agreement.
|
|
|
|
#ifndef CAS_STATUS_H
|
|
#define CAS_STATUS_H
|
|
|
|
#include <string>
|
|
|
|
namespace wvcas {
|
|
|
|
// TODO(jfore): Add more detailed error status codes.
|
|
enum class CasStatusCode : int32_t {
|
|
kUnknownError = 0,
|
|
kNoError = 1,
|
|
kCryptoInterfaceError = 2,
|
|
kCryptoSessionError = 3,
|
|
kCasLicenseError = 4,
|
|
kIndividualizationError = 5,
|
|
kInvalidParameter = 6,
|
|
kDecryptionError = 7,
|
|
kKeyNotFound = 8,
|
|
kSessionNotFound = 9,
|
|
kUnknownLicenseType = 10,
|
|
kLicenseFileParseError = 11,
|
|
kInvalidLicenseFile = 12,
|
|
kInvalidPesData = 13,
|
|
kDeferedEcmProcessing = 14,
|
|
kAccessDeniedByParentalControl = 15,
|
|
kUnknownEvent = 16,
|
|
kOEMCryptoVersionMismatch = 17,
|
|
};
|
|
|
|
class CasStatus {
|
|
public:
|
|
CasStatus(CasStatusCode status = CasStatusCode::kNoError,
|
|
const std::string& err_string = std::string())
|
|
: status_(status), err_string_(err_string) {}
|
|
static CasStatus OkStatus() { return CasStatus(); }
|
|
virtual ~CasStatus() {}
|
|
|
|
virtual CasStatusCode status_code() const { return status_; }
|
|
virtual const std::string& error_string() const { return err_string_; }
|
|
virtual bool ok() const { return status_ == CasStatusCode::kNoError; }
|
|
|
|
private:
|
|
CasStatusCode status_;
|
|
std::string err_string_;
|
|
};
|
|
|
|
} // namespace wvcas
|
|
|
|
#endif // CAS_STATUS_H
|