Initial Commit
[Projects.git] / pkgbuilds / wiifuse / src / wiifuse-0.2.0 / tmd.h
blob0cdf3cee154b84b5a7f4a6a44af990ddc0bfcaf3
1 /*
2 * Copyright (C) 2008 dhewg, #wiidev efnet
4 * this file is part of wiifuse
5 * http://wiibrew.org/index.php?title=Wiifuse
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #ifndef _TMD_H_
23 #define _TMD_H_
25 enum tmd_sig {
26 SIG_UNKNOWN = 0,
27 SIG_RSA_2048,
28 SIG_RSA_4096
31 struct tmd_content {
32 u32 cid;
33 u16 index;
34 u16 type;
35 u64 size;
36 u8 hash[20];
39 struct tmd {
40 enum tmd_sig sig_type;
41 u8 *sig;
42 char issuer[64];
43 u8 version;
44 u8 ca_crl_version;
45 u8 signer_crl_version;
46 u64 sys_version;
47 u64 title_id;
48 u32 title_type;
49 u16 group_id;
50 u32 access_rights;
51 u16 title_version;
52 u16 num_contents;
53 u16 boot_index;
54 struct tmd_content *contents;
57 struct image_file;
59 void tmd_load (struct image_file *image, u32 part);
60 void tmd_free (struct tmd *tmd);
62 #endif