Added key_session_ guard to SelectKey. am: 1fac6fa5de
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/17262613 Change-Id: Ic5fbcc7fd3479edb6a78c522b0ff5a9b78663963
This commit is contained in:
@@ -1539,7 +1539,9 @@ CdmResponseType CryptoSession::LoadOemCertificatePrivateKey(
|
|||||||
// Private.
|
// Private.
|
||||||
CdmResponseType CryptoSession::SelectKey(const std::string& key_id,
|
CdmResponseType CryptoSession::SelectKey(const std::string& key_id,
|
||||||
CdmCipherMode cipher_mode) {
|
CdmCipherMode cipher_mode) {
|
||||||
|
RETURN_IF_NOT_OPEN(CRYPTO_SESSION_NOT_OPEN);
|
||||||
const OEMCryptoResult sts = WithOecSessionLock("SelectKey", [&] {
|
const OEMCryptoResult sts = WithOecSessionLock("SelectKey", [&] {
|
||||||
|
RETURN_IF_NULL(key_session_, OEMCrypto_ERROR_INVALID_SESSION);
|
||||||
return key_session_->SelectKey(key_id, cipher_mode);
|
return key_session_->SelectKey(key_id, cipher_mode);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user