Skip to content

Commit

Permalink
Merge pull request #833 from LiEnby/patch-2
Browse files Browse the repository at this point in the history
Add functions relating to GC authentication
  • Loading branch information
Princess-of-Sleeping authored Jan 26, 2024
2 parents 55d81b4 + 21064fe commit 9686364
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 0 deletions.
11 changes: 11 additions & 0 deletions db/360/SceSblGcAuthMgr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ modules:
SceSblGcAuthMgr:
nid: 0xDB1A9016
libraries:
SceSblGcAuthMgrDrmBBForDriver:
nid: 0x1926B182
kernel: true
functions:
ksceSblGcAuthMgrDrmBBClearCartSecret: 0xBB451E83
ksceSblGcAuthMgrDrmBBGetCartSecret: 0xBB70DDC0
SceSblGcAuthMgrGcAuthForDriver:
nid: 0xC6627F5E
kernel: true
functions:
ksceSblGcAuthMgrGcAuthCartAuthentication: 0x68781760
SceSblGcAuthMgr:
kernel: false
nid: 0x7B13BCF7
Expand Down
3 changes: 3 additions & 0 deletions docs/definitions.dox
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@
*
* \defgroup SceSblSsComm SM Loader
* Interface for sm loading/CallFunc
*
* \defgroup SceSblGcAuthMgr game cart Authentication Manager
* Interface for authentication with game carts
* \}
*
* \defgroup update Update
Expand Down
13 changes: 13 additions & 0 deletions include/psp2kern/kernel/gcauthmgr.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* \kernelgroup{SceSblGcAuthMgr}
* \usage{psp2kern/kernel/gcauthmgr.h}
*/


#ifndef _PSP2KERN_KERNEL_GCAUTHMGR_H_
#define _PSP2KERN_KERNEL_GCAUTHMGR_H_

#include <psp2kern/kernel/gcauthmgr/drm_bb.h>
#include <psp2kern/kernel/gcauthmgr/gc_auth.h>

#endif /* _PSP2KERN_KERNEL_GCAUTHMGR_H_ */
35 changes: 35 additions & 0 deletions include/psp2kern/kernel/gcauthmgr/drm_bb.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/**
* \kernelgroup{SceSblGcAuthMgr}
* \usage{psp2kern/kernel/gcauthmgr/drm_bb.h,SceSblGcAuthMgrDrmBBForDriver_stub}
*/

#ifndef __PSP2KERN_GCAUTHMGR_DRM_BB_H__
#define __PSP2KERN_GCAUTHMGR_DRM_BB_H__

#include <psp2kern/types.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
* @brief Removes derived cart secret from memory.
*
* @return 0 on success, < 0 on error.
*/
int ksceSblGcAuthMgrDrmBBClearCartSecret(void);

/**
* @brief Gets derived cart secret from memory.
*
* @param[in] secret - Pointer to 0x20 bytes.
*
* @return 0 on success, < 0 on error.
*/
int ksceSblGcAuthMgrDrmBBGetCartSecret(void* secret);

#ifdef __cplusplus
}
#endif

#endif /* __PSP2KERN_GCAUTHMGR_DRM_BB_H__ */
28 changes: 28 additions & 0 deletions include/psp2kern/kernel/gcauthmgr/gc_auth.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* \kernelgroup{SceSblGcAuthMgr}
* \usage{psp2kern/kernel/gcauthmgr/gc_auth.h,SceSblGcAuthMgrGcAuthForDriver_stub}
*/

#ifndef __PSP2KERN_GCAUTHMGR_GC_AUTH_H__
#define __PSP2KERN_GCAUTHMGR_GC_AUTH_H__

#include <psp2kern/types.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
* @brief Runs gamecart authentication
*
* @param[in] key_id - Not used for anything but must be < 0x10000.
*
* @return 0 on success, < 0 on error.
*/
int ksceSblGcAuthMgrGcAuthCartAuthentication(SceUInt32 key_id);

#ifdef __cplusplus
}
#endif

#endif /* __PSP2KERN_GCAUTHMGR_GC_AUTH_H__ */
1 change: 1 addition & 0 deletions include/vitasdkkern.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <psp2kern/kernel/dipsw.h>
#include <psp2kern/kernel/dmac.h>
#include <psp2kern/kernel/excpmgr.h>
#include <psp2kern/kernel/gcauthmgr.h>
#include <psp2kern/kernel/intrmgr.h>
#include <psp2kern/kernel/iofilemgr.h>
#include <psp2kern/kernel/modulemgr.h>
Expand Down

0 comments on commit 9686364

Please sign in to comment.