Closed
Bug 1214018
Opened 10 years ago
Closed 10 years ago
[EME] Generate machine ID on MacOSX
Categories
(Core :: Audio/Video: MediaStreamGraph, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla45
Tracking | Status | |
---|---|---|
firefox45 | --- | fixed |
People
(Reporter: cpearce, Assigned: mozbugz)
References
Details
Attachments
(4 files, 2 obsolete files)
6.93 KB,
patch
|
cpearce
:
review+
|
Details | Diff | Splinter Review |
3.21 KB,
patch
|
cpearce
:
review+
|
Details | Diff | Splinter Review |
5.79 KB,
patch
|
mozbugz
:
review+
|
Details | Diff | Splinter Review |
10.25 KB,
patch
|
mozbugz
:
review+
|
Details | Diff | Splinter Review |
For Adobe EME to be supported on MacOSX, we'll need a machine-specific ID. We used rlz on Windows, I don't recall whether that has a MacOSX implementation.
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → gsquelart
Assignee | ||
Comment 1•10 years ago
|
||
Part 1: Using vector to pass machine id.
GetRawMachineId was returning its generated data through a 'string16', which on
Windows was conveniently equivalent to a std::wstring.
However on Mac, wstring uses 32-bit characters, so in order to comply with the
string16 interface, a lot of non-trivial code would have to be imported and
vetted.
Also, in the end GMPLoader::Load passes this string16 to SHA256_Update() as a
sequence of bytes, the actual type of the data is lost!
So to simplify this work, GetRawMachineId will now return its data through a
vector of bytes, and the platform-dependent implementations may use whatever
data type they want internally.
The Windows GetRawMachineId actually returns the same data in this vector, so
it stays compatible with the previous code.
Attachment #8680946 -
Flags: review?(cpearce)
Assignee | ||
Comment 2•10 years ago
|
||
Part 2: Import machine_id_mac.cc from Android repo.
Retrieved from:
https://chromium.googlesource.com/chromium/src/+/6c3bf032651d5f912775e0c8cd7e962454145ced/rlz/mac/lib/machine_id_mac.cc
Attachment #8680947 -
Flags: review?(cpearce)
Assignee | ||
Comment 3•10 years ago
|
||
Part 3: Modify machine_id_mac for FF build.
Necessary routines were extracted from other files in:
https://chromium.googlesource.com/chromium/src/+/6c3bf032651d5f912775e0c8cd7e962454145ced/
(otherwise a lot of code would have had to be imported, most of which would be
unused anyway.)
These extracted routines were reduced to only the actually-used code.
base::StringPrintf was only used to stringify a few hex values, this particular
use was easier to reimplement in a small loop rather than trying to extract the
whole printf suite.
base::UTF8toUTF16 is not needed, as we just return bytes. So internally a
std::string (containing UTF8) is used and its contents transferred to the
output buffer.
Attachment #8680949 -
Flags: review?(cpearce)
Assignee | ||
Comment 4•10 years ago
|
||
Part 4: Use machine_id_mac in GMPLoader.
Having HASH_NODE_ID_WITH_DEVICE_ID #defined is enough for GMPLoader to start
using the Mac version of GetRawMachineId.
Note: The stack (that may contain information gathered during GetRawMachineId)
is not erased, so it could theoretically be possible for a compromised GMP to
find out some sensitive user information. Another bug will deal with this.
Attachment #8680950 -
Flags: review?(cpearce)
Reporter | ||
Updated•10 years ago
|
Attachment #8680946 -
Flags: review?(cpearce) → review+
Reporter | ||
Updated•10 years ago
|
Attachment #8680947 -
Flags: review?(cpearce) → review+
Reporter | ||
Comment 5•10 years ago
|
||
Comment on attachment 8680949 [details] [diff] [review]
1214018-p3-port-machine_id_mac.patch
Review of attachment 8680949 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/media/gmp/rlz/mac/lib/machine_id_mac.cc
@@ +11,3 @@
>
> +// Note: The original machine_id_mac.cc code is in namespace rlz_lib below.
> +// It depends on some external files, which would bring in a log of Android code
"log of Android code"
You mean "lot of Chromium code", right?
@@ +286,5 @@
> + id += "mac:";
> + static const char hex[] =
> + { '0', '1', '2', '3', '4', '5', '6', '7',
> + '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
> + for (int i = 0; i < 6; ++i) {
s/6/kIOEthernetAddressSize/
Attachment #8680949 -
Flags: review?(cpearce) → review+
Reporter | ||
Updated•10 years ago
|
Attachment #8680950 -
Flags: review?(cpearce) → review+
Assignee | ||
Comment 6•10 years ago
|
||
Only changed check-in comment (Android->Chromium), no actual code change; carrying r=cpearce.
Attachment #8680947 -
Attachment is obsolete: true
Attachment #8681022 -
Flags: review+
Assignee | ||
Comment 7•10 years ago
|
||
Small update to address review comments from comment 5. Carrying r=cpearce.
Attachment #8680949 -
Attachment is obsolete: true
Attachment #8681024 -
Flags: review+
Assignee | ||
Comment 8•10 years ago
|
||
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/0475822b1b9d
https://hg.mozilla.org/integration/mozilla-inbound/rev/5920220e2c6e
https://hg.mozilla.org/integration/mozilla-inbound/rev/b80310f23d9f
https://hg.mozilla.org/integration/mozilla-inbound/rev/0b0e8e2514f9
Keywords: checkin-needed
Comment 10•10 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/0475822b1b9d
https://hg.mozilla.org/mozilla-central/rev/5920220e2c6e
https://hg.mozilla.org/mozilla-central/rev/b80310f23d9f
https://hg.mozilla.org/mozilla-central/rev/0b0e8e2514f9
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Comment 11•10 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-b2g44_v2_5/rev/0475822b1b9d
https://hg.mozilla.org/releases/mozilla-b2g44_v2_5/rev/5920220e2c6e
https://hg.mozilla.org/releases/mozilla-b2g44_v2_5/rev/b80310f23d9f
https://hg.mozilla.org/releases/mozilla-b2g44_v2_5/rev/0b0e8e2514f9
status-b2g-v2.5:
--- → fixed
Comment 12•10 years ago
|
||
removing the b2g 2.5 flag since this commit has been reverted due to an incorrect merge, sorry for the confusion
status-b2g-v2.5:
fixed → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•