mirror of
https://github.com/IllusionMan1212/vitasdk-odin.git
synced 2026-10-24 02:12:38 +00:00
update to latest vita-headers
This commit is contained in:
+8
-6
@@ -56,20 +56,22 @@ foreign npdrm {
|
||||
*
|
||||
* @return 0 on success, < 0 on error.
|
||||
*/
|
||||
_sceNpDrmGetRifNameForInstall :: proc(rif_name: [^]c.char, rif_data: rawptr, unk: c.int) -> c.int ---
|
||||
_sceNpDrmGetRifNameForInstall :: proc(rif_name: [^]c.char, rif_data: *SceNpDrmLicense, unk: c.int) -> c.int ---
|
||||
|
||||
/**
|
||||
* Get PSM rif key
|
||||
*
|
||||
* @param[in] license_buf - RIF buffer (1024 bytes)
|
||||
*
|
||||
* @param[out] keydata - Decrypted key data
|
||||
* @param[out] keydata - Decrypted keyset
|
||||
*
|
||||
* @param[out] exp_time - Expire times output
|
||||
*
|
||||
* @param[in] flags - Unknown
|
||||
*
|
||||
* @return 0 on success, < 0 on error
|
||||
*/
|
||||
scePsmDrmGetRifKey :: proc(#by_ptr license_buf: ScePsmDrmLicense, keydata: [^]c.char, flags: c.int) -> c.int ---
|
||||
scePsmDrmGetRifKey :: proc(#by_ptr license_buf: ScePsmDrmLicense, keydata: *ScePsmDrmKeySet, flags: c.int, exp_time: *ScePsmDrmExpireTime) -> c.int ---
|
||||
}
|
||||
|
||||
foreign npdrmpackage {
|
||||
@@ -154,7 +156,7 @@ foreign npdrmkern {
|
||||
*
|
||||
* @return 0 on success, < 0 on error.
|
||||
*/
|
||||
ksceNpDrmGetRifVitaKey :: proc(license: rawptr, klicense: rawptr, flags: ^c.int, sku_flags: ^c.int, lic_start_time: ^sce.UInt64, lic_exp_time: ^sce.UInt64) -> c.int ---
|
||||
ksceNpDrmGetRifVitaKey :: proc(license: ^SceNpDrmLicense, klicense: rawptr, flags: ^c.int, sku_flags: ^c.int, lic_start_time: ^sce.UInt64, lic_exp_time: ^sce.UInt64) -> c.int ---
|
||||
|
||||
/**
|
||||
* Get license key info for a PSP game
|
||||
@@ -167,7 +169,7 @@ foreign npdrmkern {
|
||||
*
|
||||
* @return 0 on success, < 0 on error.
|
||||
*/
|
||||
ksceNpDrmGetRifPspKey :: proc(license: rawptr, klicense: rawptr, flags: c.int, lic_start_time: ^sce.UInt64, lic_exp_time: ^sce.UInt64) -> c.int ---
|
||||
ksceNpDrmGetRifPspKey :: proc(license: ^SceNpDrmLicense, klicense: rawptr, flags: c.int, lic_start_time: ^sce.UInt64, lic_exp_time: ^sce.UInt64) -> c.int ---
|
||||
|
||||
/**
|
||||
* Get license info
|
||||
@@ -187,7 +189,7 @@ foreign npdrmkern {
|
||||
*
|
||||
* @return 0 on success, < 0 on error.
|
||||
*/
|
||||
ksceNpDrmGetRifInfo :: proc(license: rawptr, license_size: sce.Size, check_sign: c.int, content_id: [^]c.char, account_id: ^sce.UInt64, license_version: ^c.int, license_flags: ^c.int, flags: ^c.int, sku_flags: ^c.int, lic_start_time: ^sce.Int64, lic_exp_time: ^sce.Int64, flags2: ^sce.UInt64) -> c.int ---
|
||||
ksceNpDrmGetRifInfo :: proc(license: ^SceNpDrmLicense, license_size: sce.Size, check_sign: c.int, content_id: [^]c.char, account_id: ^sce.UInt64, license_version: ^c.int, license_flags: ^c.int, flags: ^c.int, sku_flags: ^c.int, lic_start_time: ^sce.Int64, lic_exp_time: ^sce.Int64, flags2: ^sce.UInt64) -> c.int ---
|
||||
|
||||
/**
|
||||
* Verify a eboot.pbp signature "__sce_ebootpbp"
|
||||
|
||||
+23
-9
@@ -3,6 +3,22 @@ package npdrm
|
||||
import "core:c"
|
||||
import sce "../common"
|
||||
|
||||
ScePsmDrmKeySet :: struct {
|
||||
hmac_key: [0x20]sce.UInt8,
|
||||
key: [0x10]sce.UInt8,
|
||||
signature: [0x1D0]sce.UInt8,
|
||||
}
|
||||
#assert(size_of(ScePsmDrmKeySet) == 0x200)
|
||||
|
||||
ScePsmDrmExpireTime :: struct { // size is 0x10
|
||||
start_date: ^sce.RtcTick,
|
||||
end_date: ^sce.RtcTick,
|
||||
pad: [2]c.int,
|
||||
}
|
||||
#assert(size_of(ScePsmDrmExpireTime) == 0x10)
|
||||
|
||||
VITASDK_BUILD_ASSERT_EQ(0x10, ScePsmDrmExpireTime);
|
||||
|
||||
SceNpDrmActivationData :: struct { // size is 0x1038
|
||||
act_type: sce.Int16,
|
||||
version_flag: sce.Int16,
|
||||
@@ -21,16 +37,16 @@ SceNpDrmActivationData :: struct { // size is 0x1038
|
||||
#assert(size_of(SceNpDrmActivationData) == 0x1038)
|
||||
|
||||
SceNpDrmLicense :: struct { // size is 0x200
|
||||
version: sce.Int16, // -1 VITA, 0 PSP, 1 PSP-VITA
|
||||
version: sce.Int16, // -1 VITA (NPDRM_FREE), 0 PSP, 1 PSP-VITA
|
||||
version_flags: sce.Int16, // 0, 1
|
||||
license_type: sce.Int16, // 1
|
||||
license_flags: sce.Int16, // 0x400:non-check ecdsa
|
||||
account_id: sce.UInt64,
|
||||
account_id: sce.UInt64, // 0x0:NPDRM_FREE
|
||||
content_id: [0x30]c.char,
|
||||
key_table: [0x10]c.char,
|
||||
key1: [0x10]c.char,
|
||||
start_time: sce.Int64,
|
||||
expiration_time: sce.Int64,
|
||||
start_time: sce.RtcTick,
|
||||
expiration_time: sce.RtcTick,
|
||||
ecdsa_signature: [0x28]c.char,
|
||||
flags: sce.Int64,
|
||||
key2: [0x10]c.char,
|
||||
@@ -52,14 +68,12 @@ ScePsmDrmLicense :: struct {
|
||||
account_id: sce.UInt64,
|
||||
unk3: sce.UInt32,
|
||||
unk4: sce.UInt32,
|
||||
start_time: sce.UInt64,
|
||||
expiration_time: sce.UInt64,
|
||||
start_time: sce.RtcTick,
|
||||
expiration_time: sce.RtcTick,
|
||||
activation_checksum: [0x20]sce.UInt8,
|
||||
content_id: [0x30]c.char,
|
||||
unk5: [0x80]sce.UInt8,
|
||||
unk6: [0x20]sce.UInt8,
|
||||
key: [0x10]sce.UInt8,
|
||||
signature: [0x1D0]sce.UInt8,
|
||||
keyset: ScePsmDrmKeySet,
|
||||
rsa_signature: [0x100]sce.UInt8,
|
||||
}
|
||||
#assert(size_of(ScePsmDrmLicense) == 0x400)
|
||||
|
||||
Reference in New Issue
Block a user