mirror of
https://github.com/Atmosphere-NX/Atmosphere-libs.git
synced 2025-06-29 14:32:58 +02:00
ro: implement 9.1.0 security measures
This commit is contained in:
parent
399899a0ea
commit
344a066ada
@ -86,8 +86,12 @@ namespace ams::ro {
|
|||||||
return this->num_hashes;
|
return this->num_hashes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t GetHashesOffset() const {
|
||||||
|
return this->hashes_offset;
|
||||||
|
}
|
||||||
|
|
||||||
uintptr_t GetHashes() const {
|
uintptr_t GetHashes() const {
|
||||||
return reinterpret_cast<uintptr_t>(this) + this->hashes_offset;
|
return reinterpret_cast<uintptr_t>(this) + this->GetHashesOffset();
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 GetKeyGeneration() const {
|
u32 GetKeyGeneration() const {
|
||||||
@ -114,12 +118,16 @@ namespace ams::ro {
|
|||||||
return reinterpret_cast<const u8 *>(std::addressof(this->program_id));
|
return reinterpret_cast<const u8 *>(std::addressof(this->program_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t GetSignedAreaSize() const;
|
size_t GetSignedAreaSize() const {
|
||||||
|
return this->size - this->GetSignedAreaOffset();
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t GetSignedAreaOffset() const;
|
||||||
};
|
};
|
||||||
static_assert(sizeof(NrrHeader) == 0x350, "NrrHeader definition!");
|
static_assert(sizeof(NrrHeader) == 0x350, "NrrHeader definition!");
|
||||||
|
|
||||||
inline size_t NrrHeader::GetSignedAreaSize() const {
|
inline size_t NrrHeader::GetSignedAreaOffset() const {
|
||||||
return this->size - OFFSETOF(NrrHeader, program_id);
|
return OFFSETOF(NrrHeader, program_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
class NroHeader {
|
class NroHeader {
|
||||||
|
Loading…
Reference in New Issue
Block a user