Remove hash algorithm from renewal requests
(Merged from http://go/wvgerrit/165859.) Since renewal requests are signed with the MAC keys and not an asymmetric key, it does not make sense to query OEMCrypto for the asymmetric key hash algorithm nor to include the result in the renewal request. Bug: 262427121 Test: opk_ta Change-Id: Ib309b63b79e553f4754c013718df242247ab9488
This commit is contained in:
committed by
John Bruce
parent
1625b15b31
commit
340810f77f
@@ -503,11 +503,8 @@ CdmResponseType CdmLicense::PrepareKeyUpdateRequest(
|
||||
// Construct signature and core message.
|
||||
std::string core_message;
|
||||
std::string license_request_signature;
|
||||
bool should_specify_algorithm;
|
||||
OEMCrypto_SignatureHashAlgorithm oec_algorithm = OEMCrypto_SHA1;
|
||||
const CdmResponseType status = crypto_session_->PrepareAndSignRenewalRequest(
|
||||
serialized_license_req, &core_message, &license_request_signature,
|
||||
should_specify_algorithm, oec_algorithm);
|
||||
serialized_license_req, &core_message, &license_request_signature);
|
||||
if (status != NO_ERROR) return status;
|
||||
|
||||
if (license_request_signature.empty()) {
|
||||
@@ -521,14 +518,6 @@ CdmResponseType CdmLicense::PrepareKeyUpdateRequest(
|
||||
signed_message.set_signature(license_request_signature);
|
||||
signed_message.set_msg(serialized_license_req);
|
||||
signed_message.set_oemcrypto_core_message(core_message);
|
||||
if (should_specify_algorithm) {
|
||||
HashAlgorithmProto proto_algorithm =
|
||||
HashAlgorithmProto::HASH_ALGORITHM_UNSPECIFIED;
|
||||
if (!OecAlgorithmToProtoAlgorithm(oec_algorithm, proto_algorithm)) {
|
||||
return CdmResponseType(UNSUPPORTED_SIGNATURE_HASH_ALGORITHM_2);
|
||||
}
|
||||
signed_message.set_hash_algorithm(proto_algorithm);
|
||||
}
|
||||
|
||||
signed_message.SerializeToString(signed_request);
|
||||
*server_url = server_url_;
|
||||
|
||||
Reference in New Issue
Block a user