49 lines
1.6 KiB
C++
49 lines
1.6 KiB
C++
////////////////////////////////////////////////////////////////////////////////
|
|
// Copyright 2016 Google Inc.
|
|
//
|
|
// This software is licensed under the terms defined in the Widevine Master
|
|
// License Agreement. For a copy of this agreement, please contact
|
|
// widevine-licensing@google.com.
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#include "provisioning_sdk/public/provisioning_status.h"
|
|
|
|
#include "base/macros.h"
|
|
|
|
namespace widevine {
|
|
|
|
static const char* kProvisioningStatusMessage[] = {
|
|
"OK",
|
|
"Invalid certificate type",
|
|
"Provisioning engine uninitialized",
|
|
"Invalid service drm certificate",
|
|
"Invalid service private key",
|
|
"Invalid provisioning drm certificate",
|
|
"Invalid provisioning private key",
|
|
"Invalid intermediate drm certificate",
|
|
"Invalid intermediate public key",
|
|
"Invalid intermediate private key",
|
|
"Invalid status list",
|
|
"Status list expired",
|
|
"Unknown system id",
|
|
"Invalid device public key",
|
|
"Invalid device private key",
|
|
"Invalid request message",
|
|
"Invalid MAC",
|
|
"Missing DRM intermediate certificate",
|
|
"DRM device certificate not set",
|
|
"Device revoked",
|
|
"Invalid serial number",
|
|
"Internal error",
|
|
"Invalid SPOID secret sauce"
|
|
};
|
|
|
|
const char* GetProvisioningStatusMessage(ProvisioningStatus status) {
|
|
static_assert(
|
|
arraysize(kProvisioningStatusMessage) == NUM_PROVISIONING_STATUS,
|
|
"mismatching provisioning status message and provisioning status.");
|
|
return kProvisioningStatusMessage[status];
|
|
}
|
|
|
|
} // namespace widevine
|