Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Session Decrypt stub added #57

Merged
merged 2 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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));
}
Loading