Merge changes Id261ab16,I0aca81b9
* changes: Make GetMaxNumberOfSessions and GetNumberOfOpenSessions security level aware Add test for OEMCrypto_ERROR_TOO_MANY_SESSIONS
This commit is contained in:
@@ -993,7 +993,8 @@ bool CryptoSession::GetNumberOfOpenSessions(size_t* count) {
|
||||
}
|
||||
|
||||
size_t sessions_count;
|
||||
OEMCryptoResult status = OEMCrypto_GetNumberOfOpenSessions(&sessions_count);
|
||||
OEMCryptoResult status = OEMCrypto_GetNumberOfOpenSessions(
|
||||
requested_security_level_, &sessions_count);
|
||||
if (OEMCrypto_SUCCESS != status) {
|
||||
LOGW("OEMCrypto_GetNumberOfOpenSessions fails with %d", status);
|
||||
return false;
|
||||
@@ -1011,7 +1012,8 @@ bool CryptoSession::GetMaxNumberOfSessions(size_t* max) {
|
||||
}
|
||||
|
||||
size_t max_sessions;
|
||||
OEMCryptoResult status = OEMCrypto_GetMaxNumberOfSessions(&max_sessions);
|
||||
OEMCryptoResult status = OEMCrypto_GetMaxNumberOfSessions(
|
||||
requested_security_level_, &max_sessions);
|
||||
if (OEMCrypto_SUCCESS != status) {
|
||||
LOGW("OEMCrypto_GetMaxNumberOfSessions fails with %d", status);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user