diff --git a/libwvdrmengine/factory_upload_tool/android.hardware.security.keymint-service.widevine.xml b/libwvdrmengine/factory_upload_tool/android.hardware.security.keymint-service.widevine.xml index 723026ae..f2803a0b 100644 --- a/libwvdrmengine/factory_upload_tool/android.hardware.security.keymint-service.widevine.xml +++ b/libwvdrmengine/factory_upload_tool/android.hardware.security.keymint-service.widevine.xml @@ -1,6 +1,7 @@ android.hardware.security.keymint + 3 IRemotelyProvisionedComponent/widevine diff --git a/libwvdrmengine/factory_upload_tool/src/WidevineRemotelyProvisionedComponent.cpp b/libwvdrmengine/factory_upload_tool/src/WidevineRemotelyProvisionedComponent.cpp index c722d05a..67fb7dad 100644 --- a/libwvdrmengine/factory_upload_tool/src/WidevineRemotelyProvisionedComponent.cpp +++ b/libwvdrmengine/factory_upload_tool/src/WidevineRemotelyProvisionedComponent.cpp @@ -28,6 +28,8 @@ #include +#include "log.h" + namespace aidl::android::hardware::security::keymint { using ::std::string; @@ -77,7 +79,8 @@ ScopedAStatus WidevineRemotelyProvisionedComponent::getHardwareInfo( RpcHardwareInfo* info) { info->versionNumber = 3; info->rpcAuthorName = "Google"; - info->supportedEekCurve = RpcHardwareInfo::CURVE_25519; + info->supportedEekCurve = RpcHardwareInfo::CURVE_NONE; + info->supportedNumKeysInCsr = RpcHardwareInfo::MIN_SUPPORTED_NUM_KEYS_IN_CSR; info->uniqueId = "Widevine Implementation"; return ScopedAStatus::ok(); } @@ -85,33 +88,17 @@ ScopedAStatus WidevineRemotelyProvisionedComponent::getHardwareInfo( ScopedAStatus WidevineRemotelyProvisionedComponent::generateEcdsaP256KeyPair( bool /* testMode */, MacedPublicKey* /* macedPublicKey */, bytevec* /* privateKeyHandle */) { - return Status("Invalid operation."); + return Status( + "Invalid operation: generateEcdsaP256KeyPair() is not supported."); } ScopedAStatus WidevineRemotelyProvisionedComponent::generateCertificateRequest( - bool testMode, const vector& keysToSign, - const bytevec& endpointEncCertChain, const bytevec& /* challenge */, - DeviceInfo* deviceInfo, ProtectedData* protectedData, + bool /* testMode */, const vector& /* keysToSign */, + const bytevec& /* endpointEncCertChain */, const bytevec& /* challenge */, + DeviceInfo* /* deviceInfo */, ProtectedData* /* protectedData */, bytevec* /* keysToSignMac */) { - if (!keysToSign.empty()) { - return Status("Invalid operation: Keys to sign must be empty."); - } - if (deviceInfo == nullptr) { - return Status("Parameter deviceInfo must not be null."); - } - if (protectedData == nullptr) { - return Status("Parameter protectedData must not be null."); - } - - if (provisioner_ == nullptr) { - provisioner_ = std::make_unique(); - } - if (!provisioner_->GenerateCertificateRequest(testMode, endpointEncCertChain, - deviceInfo->deviceInfo, - protectedData->protectedData)) { - return Status("Failed to generate certificate request."); - } - return ScopedAStatus::ok(); + return Status(IRemotelyProvisionedComponent::STATUS_REMOVED, + "generateCertificateRequestV1 not supported."); } ScopedAStatus @@ -119,7 +106,7 @@ WidevineRemotelyProvisionedComponent::generateCertificateRequestV2( const std::vector& keysToSign, const std::vector& challenge, std::vector* csr) { if (!keysToSign.empty()) { - return Status("Invalid operation: Keys to sign must be empty."); + LOGW("Keys to sign should be empty."); } if (csr == nullptr) { return Status("Parameter csr must not be null.");