Unit Tests for Security Patch Level
Merge of widevine change http://go/wvgerrit/16249 This CL adds unit tests and reference code for the security patch level, which is a new feature in OEMCrypto v11. This CL also adjusts the dynamic and static adapters to still run with devices that have a v10 OEMCrypto. The level 3 haystack code will be updated in a future CL. bug: 26188985 Change-Id: I518ef46b4098cf3718fe0c0390bfb6825db4fb6b
This commit is contained in:
@@ -204,7 +204,7 @@ typedef enum OEMCrypto_Algorithm {
|
||||
#define OEMCrypto_FirstSubsample 1
|
||||
#define OEMCrypto_LastSubsample 2
|
||||
|
||||
/* OEMCrypto_PatternDesc
|
||||
/* OEMCrypto_CENCEncryptPatternDesc
|
||||
* This is used in OEMCrypto_DecryptCENC to indicate the encrypt/skip pattern
|
||||
* used, as specified in the CENC standard.
|
||||
*/
|
||||
@@ -212,7 +212,7 @@ typedef struct {
|
||||
size_t encrypt; // number of 16 byte blocks to decrypt.
|
||||
size_t skip; // number of 16 byte blocks to leave in clear.
|
||||
size_t offset; // offset into the pattern in blocks for this call.
|
||||
} OEMCrypto_PatternDesc;
|
||||
} OEMCrypto_CENCEncryptPatternDesc;
|
||||
|
||||
/*
|
||||
* OEMCrypto_Usage_Entry_Status.
|
||||
@@ -281,7 +281,7 @@ typedef enum OEMCrypto_HDCP_Capability {
|
||||
#define OEMCrypto_WrapKeybox _oecc08
|
||||
#define OEMCrypto_OpenSession _oecc09
|
||||
#define OEMCrypto_CloseSession _oecc10
|
||||
#define OEMCrypto_DecryptCTR _oecc11
|
||||
#define OEMCrypto_DecryptCTR_V10 _oecc11
|
||||
#define OEMCrypto_GenerateDerivedKeys _oecc12
|
||||
#define OEMCrypto_GenerateSignature _oecc13
|
||||
#define OEMCrypto_GenerateNonce _oecc14
|
||||
@@ -305,7 +305,7 @@ typedef enum OEMCrypto_HDCP_Capability {
|
||||
#define OEMCrypto_ReportUsage _oecc32
|
||||
#define OEMCrypto_DeleteUsageEntry _oecc33
|
||||
#define OEMCrypto_DeleteUsageTable _oecc34
|
||||
#define OEMCrypto_LoadKeys_v10 _oecc35
|
||||
#define OEMCrypto_LoadKeys_V9_or_V10 _oecc35
|
||||
#define OEMCrypto_GenerateRSASignature _oecc36
|
||||
#define OEMCrypto_GetMaxNumberOfSessions _oecc37
|
||||
#define OEMCrypto_GetNumberOfOpenSessions _oecc38
|
||||
@@ -1076,7 +1076,7 @@ OEMCryptoResult OEMCrypto_DecryptCENC(OEMCrypto_SESSION session,
|
||||
const uint8_t *iv,
|
||||
size_t block_offset,
|
||||
OEMCrypto_DestBufferDesc* out_buffer,
|
||||
const OEMCrypto_PatternDesc* pattern,
|
||||
const OEMCrypto_CENCEncryptPatternDesc* pattern,
|
||||
uint8_t subsample_flags);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user