SSL services: Difference between revisions
No edit summary |
|||
Line 281: | Line 281: | ||
The buffer contains the output server cert DER. The first u32 is the output size, the second u32 is the total certs in the buffer. | The buffer contains the output server cert DER. The first u32 is the output size, the second u32 is the total certs in the buffer. | ||
When [[#OptionType|GetServerCertChain]] is set, the output buffer contains the full chain. This buffer can then be parsed by a seperate sdknso func. | When [[#OptionType|GetServerCertChain]] is set, the output buffer contains the full chain. This buffer can then be parsed by a seperate sdknso func: | ||
* The header is at +0. +0 must match a magicnum (0x4E4D684374726543 "CertChMN"), and the u32 at +0x4 must be larger than the input cert_index. | |||
* The data at +0x10 is the 0x8-byte array-entries, for each cert. Entry +0x0 is the u32 size, and +0x4 is the u32 offset. These are copied to the output "nn::ssl::Connection::ServerCertDetail" struct, for the entry with the input cert_index: +0 = u32 size, +8 = address (input_buffer+offset). | |||
==== Read ==== | ==== Read ==== |