Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aaaf242d authored by Hansong Zhang's avatar Hansong Zhang
Browse files

GD SecurityRecord: Explicitly set IsEncrypted to false upon loading

IsEncrypted is set to true only after Encryption Change event.

Test: cert/run --host
Tag: #gd-refactor
Bug: 141555841
Change-Id: Ia21eeb7321146480536a8cd98f854709fef2bc9c
parent 9f7f064d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -129,6 +129,7 @@ void SecurityRecordStorage::LoadSecurityRecords(std::set<std::shared_ptr<record:
      byte_array = common::ByteArray<16>::FromString(*device.Le().GetSignatureKey());
      record->signature_key = std::make_optional<std::array<uint8_t, 16>>(byte_array->bytes);
    }
    record->SetIsEncrypted(false);
    record->SetIsEncryptionRequired(device.GetIsEncryptionRequired() == 1 ? true : false);
    record->SetAuthenticated(device.GetIsAuthenticated() == 1 ? true : false);
    record->SetRequiresMitmProtection(device.GetRequiresMitmProtection() == 1 ? true : false);