Commit Graph

1240 Commits

Author SHA1 Message Date
Fred Gylys-Colwell
7416795401 am 802fe3b3: Lock session list in CdmEngine OnTimerEvent
* commit '802fe3b35c42975cad30b947903e002500f2a6c7':
  Lock session list in CdmEngine OnTimerEvent
2015-02-11 20:04:44 +00:00
Fred Gylys-Colwell
802fe3b35c Lock session list in CdmEngine OnTimerEvent
This is a copy of the widevine CL:
https://widevine-internal-review.googlesource.com/#/c/12742/

If a session is closed at the same time as an OnTimerEvent is
processing an event, there could be a race condition between the two
threads.  This CL adds a lock that prevents a session from being
removed from the list while the timer is currently processing an
event.

If CloseSession is called while the OnTimerEvent method is active, the
session will be added to a dead list, and deleted when the timer event
has finished.

This CL does not address the main problem in bug 19252886, but
one bugreport, netflix_log_3.txt, indicates there may have been
a problem with the CDM timer.
bug: 19252886

Change-Id: I17190edaeb3eef1295d4d204232cc4262cb5fa9b
2015-02-10 20:11:57 -08:00
Narayan Kamath
fc2b694b4f Declare explicit dependency org.apache.http.legacy.
This is required because these makefiles contain a module that's
building agains the "current" SDK and will need to add an explicit
compile time dependency on the apache API.

Note that no runtime dependency is needed because the app targets
SDK version 12 (?!!).

bug: 18027885
Change-Id: I37587b91f9c52f88a8becce0449ac9b24a77fdad
2015-02-05 12:50:05 +00:00
Fred Gylys-Colwell
a09f39bb63 am 6a614168: am 6408ce05: am 1514ae0d: Terminate Level 1 OEMCrypto on Initialization Error
* commit '6a6141682252e334f2360fcd4fa2b99d8dc38dd8':
  Terminate Level 1 OEMCrypto on Initialization Error
2015-01-23 10:26:59 +00:00
Jeff Tinker
5be22b7184 am 173e6031: am 8961cd24: Fix for zero-sized corrupted license files
* commit '173e6031f3441bb04195ae7be4f959da6dee693d':
  Fix for zero-sized corrupted license files
2015-01-23 10:26:58 +00:00
Fred Gylys-Colwell
6a61416822 am 6408ce05: am 1514ae0d: Terminate Level 1 OEMCrypto on Initialization Error
* commit '6408ce05d4121ec526b6e9ddcce4a26dc850324c':
  Terminate Level 1 OEMCrypto on Initialization Error
2015-01-23 08:45:40 +00:00
Jeff Tinker
173e6031f3 am 8961cd24: Fix for zero-sized corrupted license files
* commit '8961cd2404b7064d69288b5572ffd0d454004280':
  Fix for zero-sized corrupted license files
2015-01-23 08:45:27 +00:00
Fred Gylys-Colwell
6408ce05d4 am 1514ae0d: Terminate Level 1 OEMCrypto on Initialization Error
* commit '1514ae0dfb1f2e5fdfea2ef022f727f76d43e68f':
  Terminate Level 1 OEMCrypto on Initialization Error
2015-01-23 02:11:59 +00:00
Jeff Tinker
8961cd2404 Fix for zero-sized corrupted license files
Netflix reported that after pulling power while their app is active,
the app isn't able to restart.  This is because the license file for
session keys isn't getting synched to disk, so the data is still in
the buffer cache when the device shuts down.  Calling fflush and fsync
on the file ensures the data is persisted to disk.  fclose alone
doesn't do fsync.

In testing, I also noticed that the license file was being rewritten
every second which is hard on the flash filesystem.  The timer thread
was modified to avoid these frequent writes.

Merge of https://widevine-internal-review.googlesource.com/#/c/12431/
from the widevine cdm repo.

bug: 19108207
Change-Id: Ibe81e40a3c1f5d25563523da43fefdccdaa6ddcf
2015-01-22 16:20:31 -08:00
Fred Gylys-Colwell
1514ae0dfb Terminate Level 1 OEMCrypto on Initialization Error
Cherry pick of the widevine change
https://widevine-internal-review.googlesource.com/#/c/12082/

If the level 1 oemcrypto library loads and initializes, but has the
wrong version or does not have a valid keybox, then the level 3
fallback is used.   However, in those cases, the level 1 was not
terminated properly.  This caused a resource leak on some platforms.

With this CL, in OEMCrypto_Initialize, the level 1 library Terminate
is called if its Initialize was called and the level 1 library will
not be used.

bug: 18755226
Change-Id: I56e7d3349eeebd94f3fa8c4a1f4b21781cc7428b
(cherry picked from commit 62a9cf3cbe)
2015-01-23 00:08:10 +00:00
Rahul Frias
5855c37ad2 am ab3ffa9a: am 6e4896e8: Merge "Corrections to license policy handling and reporting" into lmp-mr1-dev
* commit 'ab3ffa9a55fbace41240b08010a73b5f888d2634':
  Corrections to license policy handling and reporting
2015-01-17 11:52:15 +00:00
Rahul Frias
ab3ffa9a55 am 6e4896e8: Merge "Corrections to license policy handling and reporting" into lmp-mr1-dev
* commit '6e4896e8ba52192a731eab19f454a1f51544dbab':
  Corrections to license policy handling and reporting
2015-01-17 11:46:40 +00:00
Rahul Frias
6e4896e8ba Merge "Corrections to license policy handling and reporting" into lmp-mr1-dev 2015-01-17 11:35:22 +00:00
Rahul Frias
db1382e0a3 Corrections to license policy handling and reporting
If a key query occurred before a license was received an UNKNOWN_ERROR was
returned. This now succeeds but returns no information (an empty container).

Also licenses that were already expired when received were not marked as such.
This did not cause violations in playback rules but caused an exception when
they were queried.

[ Merge of https://widevine-internal-review.googlesource.com/#/c/12300
  from wv git repo ]

b/18843625

Change-Id: I6990765c15e519ddf203a2fd8f0a130306f090a6
2015-01-16 14:48:57 -08:00
Jeff Davidson
7d4968eff7 am 6eb74fe6: Remove references to protobuf 2.3.0.
* commit '6eb74fe6a0fa8681d66e4df5d5b7f9e365055697':
  Remove references to protobuf 2.3.0.
2015-01-16 00:29:20 +00:00
Jeff Davidson
6eb74fe6a0 Remove references to protobuf 2.3.0.
Change-Id: I08b9e6441e26083cf182402916288ae073425f9c
(cherry picked from commit dfab729fd7)
2015-01-15 23:32:02 +00:00
Jeff Tinker
d6e69378ff am a27ad032: am d7907f03: am 1a5103c7: Include WV classic L3 libraries for x86 in Lollipop branches
* commit 'a27ad0329b5e71b5349492c6bde1aee7400491d8':
  Include WV classic L3 libraries for x86 in Lollipop branches
2015-01-15 04:30:16 +00:00
Jeff Tinker
a27ad0329b am d7907f03: am 1a5103c7: Include WV classic L3 libraries for x86 in Lollipop branches
* commit 'd7907f03b40a8a3e74fe6a837af676df486aea18':
  Include WV classic L3 libraries for x86 in Lollipop branches
2015-01-15 01:39:19 +00:00
Jeff Tinker
d7907f03b4 am 1a5103c7: Include WV classic L3 libraries for x86 in Lollipop branches
* commit '1a5103c739ebcac21799406a721cff2974a9852a':
  Include WV classic L3 libraries for x86 in Lollipop branches
2015-01-15 00:45:12 +00:00
Jeff Tinker
1a5103c739 Include WV classic L3 libraries for x86 in Lollipop branches
bug: 18985145
Change-Id: I659c10b33dc79bf44a6da907d168e1ef61df2172
2015-01-14 12:21:51 -08:00
Jeff Davidson
dfab729fd7 Remove references to protobuf 2.3.0.
Change-Id: I08b9e6441e26083cf182402916288ae073425f9c
2015-01-08 19:01:44 -08:00
Edwin Wong
be68323423 am 7ed523af: am 61db5926: Update Widevine Classic Library to 4.5.0.10128.
* commit '7ed523af2bd30f18b08b57cda2f2732e7610e9e5':
  Update Widevine Classic Library to 4.5.0.10128.
2014-12-29 17:24:45 +00:00
Edwin Wong
7ed523af2b am 61db5926: Update Widevine Classic Library to 4.5.0.10128.
* commit '61db592610f1a59085799e04df418e249038b588':
  Update Widevine Classic Library to 4.5.0.10128.
2014-12-26 20:30:11 +00:00
Edwin Wong
61db592610 Update Widevine Classic Library to 4.5.0.10128.
Fix "cannot play pinned movie after upgrade bug".
https://widevine-internal-review.googlesource.com/#/c/12160/

bug: 18136076
Change-Id: If14273fcb74e234618a2b450cc0affbbeca0d28f
2014-12-22 11:18:47 -08:00
Fred Gylys-Colwell
ac17fb3c3d am f9add545: am 62a9cf3c: Terminate Level 1 OEMCrypto on Initialization Error
* commit 'f9add54545bc4b8b875de41b9a111a273e1db9f4':
  Terminate Level 1 OEMCrypto on Initialization Error
2014-12-18 23:22:28 +00:00
Fred Gylys-Colwell
f9add54545 am 62a9cf3c: Terminate Level 1 OEMCrypto on Initialization Error
* commit '62a9cf3cbea34f2d04c50809703d31efd78514d9':
  Terminate Level 1 OEMCrypto on Initialization Error
2014-12-18 22:03:47 +00:00
Fred Gylys-Colwell
62a9cf3cbe Terminate Level 1 OEMCrypto on Initialization Error
Cherry pick of the widevine change
https://widevine-internal-review.googlesource.com/#/c/12082/

If the level 1 oemcrypto library loads and initializes, but has the
wrong version or does not have a valid keybox, then the level 3
fallback is used.   However, in those cases, the level 1 was not
terminated properly.  This caused a resource leak on some platforms.

With this CL, in OEMCrypto_Initialize, the level 1 library Terminate
is called if its Initialize was called and the level 1 library will
not be used.

bug: 18755226
Change-Id: I56e7d3349eeebd94f3fa8c4a1f4b21781cc7428b
2014-12-17 11:29:14 -08:00
Jeff Tinker
f4018c95c5 am b4cd98c3: am 07478a67: Ensure terminate is called in all error cases
* commit 'b4cd98c39d9e726c18c77e96c2cd9774d0512f86':
  Ensure terminate is called in all error cases
2014-12-12 21:56:24 +00:00
Jeff Tinker
b4cd98c39d am 07478a67: Ensure terminate is called in all error cases
* commit '07478a67cb9e291e60be3dea8eb70b716568ba1f':
  Ensure terminate is called in all error cases
2014-12-12 21:49:17 +00:00
Jeff Tinker
513740ee46 am d5b04d64: am 4dd74859: Fix illegal instruction fault in libwvdrmengine.so
* commit 'd5b04d6430749599416f1a627818b952c908f620':
  Fix illegal instruction fault in libwvdrmengine.so
2014-12-12 14:49:58 +00:00
Jeff Tinker
d5b04d6430 am 4dd74859: Fix illegal instruction fault in libwvdrmengine.so
* commit '4dd748597a26bdff6138fc20ed17baa32bf89ab8':
  Fix illegal instruction fault in libwvdrmengine.so
2014-12-12 14:42:27 +00:00
Jeff Tinker
07478a67cb Ensure terminate is called in all error cases
bug: 18203007
Change-Id: I0d74b348982992075ec126a324dabbff8fab9125
2014-12-11 19:27:50 -08:00
Jeff Tinker
4dd748597a Fix illegal instruction fault in libwvdrmengine.so
Merge of https://widevine-internal-review.googlesource.com/#/c/12020/
from the widevine CDM repo.

bug: 18606686
Change-Id: Iafc27f51c8d486065620c9140ce88b285fc0067c
2014-12-12 00:56:19 +00:00
Rong Xu
1fc28e7db3 am 31aa16fb: Fix gcc-4_9 warning
* commit '31aa16fbaba00537ab68256248eb049ae71e0790':
  Fix gcc-4_9 warning
2014-12-09 23:22:57 +00:00
Chong Zhang
283c199c10 am 4e600be6: am 0c752509: Merge "widevine: return -EAGAIN sooner in non-blocking mode" into lmp-mr1-dev
* commit '4e600be65ab68461633ccd59915635984aaee32b':
  widevine: return -EAGAIN sooner in non-blocking mode
2014-12-09 23:03:34 +00:00
Rong Xu
31aa16fbab Fix gcc-4_9 warning
Fix a warning in gcc-4.9:
In file included from
vendor/widevine/libwvdrmengine/cdm/core/src/max_res_engine.cpp:3:0:
vendor/widevine/libwvdrmengine/cdm/core/include/max_res_engine.h:56:9:
error: 'class wvcdm::MaxResEngine::KeyStatus' is private
   class KeyStatus {
         ^
vendor/widevine/libwvdrmengine/cdm/core/src/max_res_engine.cpp:10:53:
error: within this context
 typedef std::map<wvcdm::KeyId,
wvcdm::MaxResEngine::KeyStatus*>::const_iterator

(cherry picked from commit 944d085a79)

Change-Id: I4984bd52c52c36e59c4d09db5e4f4d581e577b07
2014-12-09 11:20:24 +01:00
Fred Gylys-Colwell
293659b808 am f47b8c81: am d2ca9d44: Merge "Level 3 OEMCrypto library for mips" into lmp-mr1-dev
* commit 'f47b8c813a68d73cd41dc0e12934b88451c69bbc':
  Level 3 OEMCrypto library for mips
2014-12-09 00:57:04 +00:00
Fred Gylys-Colwell
968a6cf948 am 5ea1279e: am 1811a8ac: Level 3 OEMCrypto library for x86
* commit '5ea1279eefb454ff80c7eb019459e2d03dc41cab':
  Level 3 OEMCrypto library for x86
2014-12-09 00:57:03 +00:00
Chong Zhang
4e600be65a am 0c752509: Merge "widevine: return -EAGAIN sooner in non-blocking mode" into lmp-mr1-dev
* commit '0c7525090f326a712724f864224323080a4cf026':
  widevine: return -EAGAIN sooner in non-blocking mode
2014-12-08 19:35:08 +00:00
Fred Gylys-Colwell
f47b8c813a am d2ca9d44: Merge "Level 3 OEMCrypto library for mips" into lmp-mr1-dev
* commit 'd2ca9d448e135ea48e5c8c6eb0e8b87c193c07cd':
  Level 3 OEMCrypto library for mips
2014-12-08 19:13:58 +00:00
Fred Gylys-Colwell
5ea1279eef am 1811a8ac: Level 3 OEMCrypto library for x86
* commit '1811a8ac12873c2c1d2a1ac215d04829868da1a8':
  Level 3 OEMCrypto library for x86
2014-12-08 19:13:58 +00:00
Chong Zhang
0c7525090f Merge "widevine: return -EAGAIN sooner in non-blocking mode" into lmp-mr1-dev 2014-12-05 23:31:39 +00:00
Chong Zhang
35b42afd0f widevine: return -EAGAIN sooner in non-blocking mode
Bug: 18536934

Change-Id: Ib9344851fceb418a2e614e966c981a997c32c466
2014-12-05 11:33:00 -08:00
Fred Gylys-Colwell
d2ca9d448e Merge "Level 3 OEMCrypto library for mips" into lmp-mr1-dev 2014-12-05 02:57:26 +00:00
Fred Gylys-Colwell
cb9360fb65 Level 3 OEMCrypto library for mips
This CL is a merge of the widevine change
https://widevine-internal-review.googlesource.com/#/c/11881

The function rand() was not available on the mips build used to
generate the level 3 oemcrypto fallback library.  This function has
been replaced by the openssl RAND_bytes(), so that compilation may
complete.

New version of library:
libwvdrmengine/level3/mips/libwvlevel3.a  NONOB Level3 Library Dec  3 2014 17:11:00

bug: 17288466
Change-Id: Ibe2ae3add4f5830ddc1cce501d76aeb4be5ce926
2014-12-03 17:39:50 -08:00
Rong Xu
944d085a79 Fix gcc-4_9 warning
Fix a warning in gcc-4.9:
In file included from
vendor/widevine/libwvdrmengine/cdm/core/src/max_res_engine.cpp:3:0:
vendor/widevine/libwvdrmengine/cdm/core/include/max_res_engine.h:56:9:
error: 'class wvcdm::MaxResEngine::KeyStatus' is private
   class KeyStatus {
         ^
vendor/widevine/libwvdrmengine/cdm/core/src/max_res_engine.cpp:10:53:
error: within this context
 typedef std::map<wvcdm::KeyId,
wvcdm::MaxResEngine::KeyStatus*>::const_iterator

Change-Id: Ic92676d09c84582de18091a91ea8742a6faf05e7
2014-12-03 15:58:58 -08:00
Fred Gylys-Colwell
1811a8ac12 Level 3 OEMCrypto library for x86
This is a merge of the Widevine change:
https://widevine-internal-review.googlesource.com/#/c/11871

The level 3 oemcrypto fall back now compiles cleanly on a Fugu, and
passes all unit tests.

New version of library:
libwvdrmengine/level3/x86/libwvlevel3.a  Level3 Library Dec  3 2014 13:06:03

bug: 17289103

Change-Id: I677888536dd2ca12e27b5985737e080b69d81477
2014-12-03 13:28:57 -08:00
Dan Albert
04a484762d am 67099326: Fix build.
* commit '670993262f57c37890cb4b1c600faa4a49434829':
  Fix build.
2014-11-26 03:12:44 +00:00
Dan Albert
670993262f Fix build.
This project is still using stlport (without telling the build system
about it), which was causing (broken) stlport headers to override
libc++ headers, leading to a broken copy of std::enable_if, which in
turn caused <atomic> to fail to compile. Since this project has
prebuilts that will need to be updated before this project can
actually move away from stlport, tell the build system that it is
still using stlport for now.

Bug: 18433002
Change-Id: I38b356428977ed2184eb28a07bd5e7424a4ace8d
(cherry picked from commit de4bc34719)
2014-11-26 03:05:50 +00:00
Dan Albert
0018a108f9 Merge "Fix build." 2014-11-25 21:42:07 +00:00