Use std::move for key strings.
[ Cherry-pick of v19 http://go/wvgerrit/219351 ] [ Merge of http://go/wvgerrit/219455 ] Coverity discovered an oppertunity to use the C++'s move semantics for the prov 4.0 keys. A similar possibility was available for the matching wrapped key. The CryptoWrappedKey class was updated to enable moving of the wrapped key as well. Bug: 406539167 Bug: 391469176 Change-Id: I7d76013638c220fc81d6d9c42add2516abd7374a
This commit is contained in:
@@ -651,10 +651,10 @@ CdmResponseType CertificateProvisioning::GetProvisioning40RequestInternal(
|
||||
// Need the wrapped Prov 4.0 private key to store once the response
|
||||
// is received. The wrapped key is not available in the response.
|
||||
prov40_wrapped_private_key_ =
|
||||
CryptoWrappedKey(private_key_type, wrapped_private_key);
|
||||
CryptoWrappedKey(private_key_type, std::move(wrapped_private_key));
|
||||
// Store the public key from the request. This is used to match
|
||||
// up the response with the most recently generated request.
|
||||
prov40_public_key_ = public_key;
|
||||
prov40_public_key_ = std::move(public_key);
|
||||
|
||||
state_ = is_oem_prov_request ? kOemRequestSent : kDrmRequestSent;
|
||||
return CdmResponseType(NO_ERROR);
|
||||
|
||||
Reference in New Issue
Block a user