AMPXI:VerifyDSiWareFooter: Difference between revisions
No edit summary |
TimmSkiller (talk | contribs) correct PXI buffer translation descriptor access types |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 8: | Line 8: | ||
| Header code [0x004301C8] | | Header code [0x004301C8] | ||
|- | |- | ||
| 1 | | 1-2 | ||
| TWL | | u64, TWL Title ID (from [[DSiWare_Exports|header]]) | ||
|- | |- | ||
| 3 | | 3 | ||
| Data | | Data size | ||
|- | |- | ||
| 4 | | 4 | ||
| ECDSA signature | | ECDSA signature size (must be 0x3C) | ||
|- | |- | ||
| 5 | | 5 | ||
| [[CTCert]] | | [[CTCert]] size (must be 0x180) | ||
|- | |- | ||
| 6 | | 6 | ||
| APCert | | APCert size (must be 0x180) | ||
|- | |- | ||
| 7 | | 7 | ||
| u8 [[DSiWare_Exports|DSiWare]] export section index | | u8, [[DSiWare_Exports|DSiWare]] export section index | ||
|- | |- | ||
| 8 | | 8 | ||
| <nowiki>( | | <nowiki>(DataSize << 8) | 0x6</nowiki> | ||
|- | |- | ||
| 9 | | 9 | ||
| | | Data pointer (contains hashes from [[DSiWare_Exports|footer]]) | ||
|- | |- | ||
| 10 | | 10 | ||
| <nowiki>( | | <nowiki>(ECDSASignatureSize << 8) | 0x16</nowiki> | ||
|- | |- | ||
| 11 | | 11 | ||
| ECDSA signature | | ECDSA signature pointer (signs data) | ||
|- | |- | ||
| 12 | | 12 | ||
| <nowiki>(CTCertSize<<8) | | | <nowiki>(CTCertSize << 8) | 0x26</nowiki> | ||
|- | |- | ||
| 13 | | 13 | ||
| [[CTCert]] | | [[CTCert]] pointer (from [[DSiWare_Exports|footer]]) | ||
|- | |- | ||
| 14 | | 14 | ||
| <nowiki>(APCertSize<<8) | | | <nowiki>(APCertSize << 8) | 0x36</nowiki> | ||
|- | |- | ||
| 15 | | 15 | ||
| APCert | | APCert pointer (from [[DSiWare_Exports|footer]]) | ||
|} | |} | ||
Line 61: | Line 58: | ||
|- | |- | ||
| 0 | | 0 | ||
| Header code | | Header code [0x00430040] | ||
|- | |- | ||
| 1 | | 1 | ||
Line 68: | Line 65: | ||
=Description= | =Description= | ||
This verifies the ECDSA signature and certificates from the [[DSiWare_Exports|DSiWare]] export footer. | This verifies the ECDSA signature and certificates from the [[DSiWare_Exports|DSiWare]] export footer. The input CTCert is verified with a DER stored in NATIVE_FIRM, separate DERs are used for retail and dev/debug. | ||
When the running NATIVE_FIRM only supports [[DSiWare_Exports|DSiWare]] exports format v1, the max data size is 0xC0, otherwise the max size is 0x1C0. |