Fix intermitent bad nonce being passed to RewrapDeviceRSAKey.
Since CryptoSession::RewrapDeviceRSAKey takes a const std::string& nonce, the calling code implicitly constructa temporary std::string from a character array with undefined termination and sometimes bogus value when nonce.data() is passed in. Bug: 9016828 Merge of https://widevine-internal-review.googlesource.com/#/c/5690/ from the Widevine CDM repository Change-Id: Ia3beaa5f1a96924a8cc53a719f25af52217b8cc5
This commit is contained in:
@@ -725,7 +725,7 @@ CdmResponseType CdmEngine::HandleProvisioningResponse(
|
|||||||
std::string wrapped_rsa_key;
|
std::string wrapped_rsa_key;
|
||||||
if (!crypto_session->RewrapDeviceRSAKey(signed_message,
|
if (!crypto_session->RewrapDeviceRSAKey(signed_message,
|
||||||
signature,
|
signature,
|
||||||
nonce.data(),
|
nonce,
|
||||||
enc_rsa_key,
|
enc_rsa_key,
|
||||||
enc_rsa_key.size(),
|
enc_rsa_key.size(),
|
||||||
rsa_key_iv,
|
rsa_key_iv,
|
||||||
|
|||||||
Reference in New Issue
Block a user