Difference between revisions of "AMNet:ImportCertificates"

From 3dbrew
Jump to navigation Jump to search
m
 
(4 intermediate revisions by 2 users not shown)
Line 9: Line 9:
 
|-
 
|-
 
| 1
 
| 1
| First certificate size
+
| First Certificate Size
 
|-
 
|-
 
| 2
 
| 2
| Second certificate size
+
| Second Certificate Size
 
|-
 
|-
 
| 3
 
| 3
| Third certificate size
+
| Third Certificate Size
 
|-
 
|-
 
| 4
 
| 4
| Fourth certificate size
+
| Fourth Certificate Size
 
|-
 
|-
 
| 5
 
| 5
| 16 * first cert size + 10
+
| (First Certificate Size << 4) <nowiki>|</nowiki> 0xA
 
|-
 
|-
 
| 6
 
| 6
| First certificate ptr
+
| First Certificate Input Pointer
 
|-
 
|-
 
| 7
 
| 7
| 16 * second cert size + 10
+
| (Second Certificate Size << 4) <nowiki>|</nowiki> 0xA
 
|-
 
|-
 
| 8
 
| 8
| Second certificate ptr
+
| Second Certificate Input Pointer
 
|-
 
|-
 
| 9
 
| 9
| 16 * third cert size + 10
+
| (Third Certificate Size << 4) <nowiki>|</nowiki> 0xA
 
|-
 
|-
 
| 10
 
| 10
| Third certificate ptr
+
| Third Certificate Input Pointer
 
|-
 
|-
 
| 11
 
| 11
| 16 * fourth cert size + 10
+
| (Fourth Certificate Size << 4) <nowiki>|</nowiki> 0xA
 
|-
 
|-
 
| 12
 
| 12
| Fourth certificate ptr
+
| Fourth Certificate Input Pointer
 
|}
 
|}
  
Line 59: Line 59:
  
 
=Description=
 
=Description=
This is called before [[AMNet:OpenTicket]] to set the [[Ticket#Certificate_Chain|certificate chain]] for the tickets to be installed. You can submit up to four certificates at a time, and if you have more than four, you can make multiple calls. If you have less than four certificates, you can pass in NULL for the pointers, 0 for the sizes, and 16*0+10=10 for the other sizes.
+
This is called before [[AMNet:BeginImportTicket]] to set the [[Ticket#Certificate_Chain|certificate chain]] for the tickets to be installed. You can submit up to four certificates at a time, and if you have more than four, you can make multiple calls. If you have less than four certificates, you can pass in NULL for the pointers, 0 for the sizes, and value 10 for the buffer-headers(word before the buf-ptr(s)).
 +
 
 +
This also verifies each cert with the issuer, etc. When attempting to use this command with the exact same cert which was already added with this command, this command will return 0 without actually adding the cert to the chain(no additional cert in ARM9-mem anywhere).
 +
 
 +
This is a wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x003D0108.

Latest revision as of 19:54, 17 April 2016

Request[edit]

Index Word Description
0 Header code [0x08190108]
1 First Certificate Size
2 Second Certificate Size
3 Third Certificate Size
4 Fourth Certificate Size
5 (First Certificate Size << 4) | 0xA
6 First Certificate Input Pointer
7 (Second Certificate Size << 4) | 0xA
8 Second Certificate Input Pointer
9 (Third Certificate Size << 4) | 0xA
10 Third Certificate Input Pointer
11 (Fourth Certificate Size << 4) | 0xA
12 Fourth Certificate Input Pointer

Response[edit]

Index Word Description
0 Header code
1 Result code

Description[edit]

This is called before AMNet:BeginImportTicket to set the certificate chain for the tickets to be installed. You can submit up to four certificates at a time, and if you have more than four, you can make multiple calls. If you have less than four certificates, you can pass in NULL for the pointers, 0 for the sizes, and value 10 for the buffer-headers(word before the buf-ptr(s)).

This also verifies each cert with the issuer, etc. When attempting to use this command with the exact same cert which was already added with this command, this command will return 0 without actually adding the cert to the chain(no additional cert in ARM9-mem anywhere).

This is a wrapper for AMPXI command 0x003D0108.