2016-10-16 20:00:34 +00:00
|
|
|
#include "am.h"
|
2016-11-28 07:45:57 +00:00
|
|
|
|
2017-07-05 20:22:25 +00:00
|
|
|
static Handle amHandle;
|
2016-10-16 20:00:34 +00:00
|
|
|
|
2016-11-28 07:45:57 +00:00
|
|
|
Result amNetGetDeviceCert(u8 const * buffer)
|
2016-10-16 20:00:34 +00:00
|
|
|
{
|
|
|
|
Result ret = 0;
|
|
|
|
u32 *cmdbuf = getThreadCommandBuffer();
|
|
|
|
|
|
|
|
cmdbuf[0] = IPC_MakeHeader(0x818,1,2); // 0x08180042
|
|
|
|
cmdbuf[1] = 0x180;
|
|
|
|
cmdbuf[2] = (0x180 << 4) | 0xC;
|
|
|
|
cmdbuf[3] = (u32)buffer;
|
|
|
|
|
2017-07-05 20:22:25 +00:00
|
|
|
if(R_FAILED(ret = svcSendSyncRequest(amHandle)))
|
|
|
|
return ret;
|
2016-10-16 20:00:34 +00:00
|
|
|
|
|
|
|
return (Result)cmdbuf[1];
|
|
|
|
}
|