Skip to content

Commit

Permalink
Session Decrypt stub added (#57)
Browse files Browse the repository at this point in the history
Summary: Session Decrypt stub added
Type: Feature
Test Plan: UT
Jira: RIALTO-632
  • Loading branch information
skywojciechowskim authored Sep 13, 2024
1 parent 35d0f13 commit 72f7050
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions library/source/open_cdm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,3 +401,12 @@ OpenCDMBool opencdm_system_supports_server_certificate(struct OpenCDMSystem *sys
}
return OpenCDMBool::OPENCDM_BOOL_FALSE;
}

OpenCDMError opencdm_session_decrypt(struct OpenCDMSession *session, uint8_t encrypted[],
const uint32_t encryptedLength, const EncryptionScheme encScheme,
const EncryptionPattern pattern, const uint8_t *IV, uint16_t IVLength,
const uint8_t *keyId, const uint16_t keyIdLength, uint32_t initWithLast15)
{
kLog << warn << __func__ << " not implemented";
return ERROR_FAIL;
}
6 changes: 6 additions & 0 deletions tests/ut/OpenCdmTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,3 +414,9 @@ TEST_F(OpenCdmTests, ShouldNotSupportCertificate)
EXPECT_CALL(*m_mediaKeysCapabilitiesMock, isServerCertificateSupported(kNetflixKeySystem)).WillOnce(Return(false));
EXPECT_EQ(OpenCDMBool::OPENCDM_BOOL_FALSE, opencdm_system_supports_server_certificate(&m_openCdmSystemMock));
}

TEST_F(OpenCdmTests, ShouldNotSupportSessionDecrypt)
{
EXPECT_EQ(ERROR_FAIL, opencdm_session_decrypt(&m_openCdmSessionMock, nullptr, 0, EncryptionScheme::Clear,
EncryptionPattern{0, 0}, nullptr, 0, nullptr, 0, 0));
}

0 comments on commit 72f7050

Please sign in to comment.