Fix RSA Key Padding in OEMCrypto Unit Tests

Merge from widevine of http://go/wvgerrit/15371

incorrectly have leading 0x00 bytes added to all integers.  This
leading 0 should only be added to integers that had a leading byte
larger than 0x80 because those would be parsed as negative numbers.

bug: 23105200
Change-Id: I1dd01cc2b83a807bbdb78c079c6ce4e01d41f616
This commit is contained in:
Fred Gylys-Colwell
2015-08-11 13:52:50 -07:00
parent 496bfc87b3
commit 29e08f2166

View File

@@ -3412,7 +3412,6 @@ class OEMCryptoCastReceiverTest : public OEMCryptoLoadsCertificateAlternates {
vector<uint8_t> field_e = encode(0x02, wvcdm::a2b_hex("010001"));
vector<uint8_t> field_d =
encode(0x02, wvcdm::a2b_hex(
"00"
"5bd910257830dce17520b03441a51a8c"
"ab94020ac6ecc252c808f3743c95b7c8"
"3b8c8af1a5014346ebc4242cdfb5d718"
@@ -3464,7 +3463,6 @@ class OEMCryptoCastReceiverTest : public OEMCryptoLoadsCertificateAlternates {
"0dcbbc9b528f64a01706e05b0b91106f"));
vector<uint8_t> field_exp2 =
encode(0x02, wvcdm::a2b_hex(
"00"
"6827924a85e88b55ba00f8219128bd37"
"24c6b7d1dfe5629ef197925fecaff5ed"
"b9cdf3a7befd8ea2e8dd3707138b3ff8"
@@ -3475,7 +3473,6 @@ class OEMCryptoCastReceiverTest : public OEMCryptoLoadsCertificateAlternates {
"eec82d7f5458ec19e71b90eeef7dff61"));
vector<uint8_t> field_invq =
encode(0x02, wvcdm::a2b_hex(
"00"
"57b73888d183a99a6307422277551a3d"
"9e18adf06a91e8b55ceffef9077c8496"
"948ecb3b16b78155cb2a3a57c119d379"