Difference between revisions of "Settings services"

From Nintendo Switch Brew
Jump to: navigation, search
(Created page with "= set = {| class="wikitable" border="1" |- ! Cmd || Name |- | 0 || GetLanguageCode |- | 1 || SetLanguageCode |- | 3 || |- | 4 || |}")
 
 
(14 intermediate revisions by 2 users not shown)
Line 12: Line 12:
 
| 4 ||
 
| 4 ||
 
|}
 
|}
 +
 +
= set:fd =
 +
 +
 +
 +
= set:cal =
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| 14 || GetDeviceCert
 +
|-
 +
| 15 || GetDeviceCert2
 +
|-
 +
| 16 || GetTLSClientPrivk
 +
|-
 +
| 17 || GetTLSClientCert
 +
|}
 +
 +
Used for accessing data calibrated at the factory. Probably only for console-unique data?(Everything read so far has been console-unique)
 +
 +
== GetDeviceCert ==
 +
Takes a type-0x16 output buffer with fixed size 0x180.
 +
 +
Returns the DeviceCert. This is identical to 3DS DeviceCert/CTCert besides the strings. NIM loads the DeviceId from this.
 +
 +
== GetDeviceCert2 ==
 +
Takes a type-0x16 output buffer with fixed size 0x240.
 +
 +
Same as GetDeviceCert, except this returns more data and the data starts differing at offset 0x108 compared to GetDeviceCert.
 +
 +
== GetTLSClientPrivk ==
 +
Takes a type-0x16 output buffer with fixed size 0x134.
 +
 +
Returns a container-structure for the encrypted TLS client-privk. Decrypting this fails unless an unknown size >0x134 is passed to this setcal cmd?
 +
 +
Used by SSL-sysmodule, see [[SSL_services|here]].
 +
 +
== GetTLSClientCert ==
 +
Takes a type-0x16 output buffer with fixed size 0x804.
 +
 +
Returns a container-structure for the plaintext TLS client-cert.
 +
 +
Used by SSL-sysmodule, see [[SSL_services|here]].
 +
 +
=== setcal Container Structure ===
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Name
 +
|-
 +
| 0x0
 +
| 0x4
 +
| Size (same size used for decryption if needed)
 +
|-
 +
| 0x4
 +
| {above size}
 +
| Actual data starts here.
 +
|}
 +
 +
= set:sys =
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| ? || GetSystemVersion
 +
|-
 +
| ? || GetSerialNumber (Returns the 0x18-byte SerialNumber string)
 +
|-
 +
| 56 || [[Flash_Filesystem#PRODINFOF|GetWirelessCertification]]
 +
|}
 +
 +
== GetSystemVersion ==
 +
Returns the content of the [[System_Version_Title]] "/file".
 +
 +
[[Category:Services]]

Latest revision as of 10:28, 2 July 2017

set

Cmd Name
0 GetLanguageCode
1 SetLanguageCode
3
4

set:fd

set:cal

Cmd Name
14 GetDeviceCert
15 GetDeviceCert2
16 GetTLSClientPrivk
17 GetTLSClientCert

Used for accessing data calibrated at the factory. Probably only for console-unique data?(Everything read so far has been console-unique)

GetDeviceCert

Takes a type-0x16 output buffer with fixed size 0x180.

Returns the DeviceCert. This is identical to 3DS DeviceCert/CTCert besides the strings. NIM loads the DeviceId from this.

GetDeviceCert2

Takes a type-0x16 output buffer with fixed size 0x240.

Same as GetDeviceCert, except this returns more data and the data starts differing at offset 0x108 compared to GetDeviceCert.

GetTLSClientPrivk

Takes a type-0x16 output buffer with fixed size 0x134.

Returns a container-structure for the encrypted TLS client-privk. Decrypting this fails unless an unknown size >0x134 is passed to this setcal cmd?

Used by SSL-sysmodule, see here.

GetTLSClientCert

Takes a type-0x16 output buffer with fixed size 0x804.

Returns a container-structure for the plaintext TLS client-cert.

Used by SSL-sysmodule, see here.

setcal Container Structure

Offset Size Name
0x0 0x4 Size (same size used for decryption if needed)
0x4 {above size} Actual data starts here.

set:sys

Cmd Name
 ? GetSystemVersion
 ? GetSerialNumber (Returns the 0x18-byte SerialNumber string)
56 GetWirelessCertification

GetSystemVersion

Returns the content of the System_Version_Title "/file".