Merge "Resize signature buffer" into jb-mr2-dev

This commit is contained in:
Jeff Tinker
2013-05-14 05:17:48 +00:00
committed by Android (Google) Code Review
2 changed files with 5 additions and 0 deletions

View File

@@ -410,6 +410,9 @@ bool CryptoSession::GenerateSignature(const std::string& message,
return false;
}
// TODO(fredgc): remove in K, when L1 library reports correct length.
signature->resize(length);
return true;
}
@@ -556,6 +559,8 @@ bool CryptoSession::RewrapDeviceRSAKey(const std::string& message,
reinterpret_cast<uint8_t*>(const_cast<char*>(wrapped_rsa_key->data())),
&wrapped_rsa_key_length);
// TODO(fredgc): remove in K, when L1 library reports correct length.
wrapped_rsa_key->resize(wrapped_rsa_key_length);
if (OEMCrypto_SUCCESS != status) {
LOGE("OEMCrypto_RewrapDeviceRSAKey fails with %d", status);
return false;