leaps_cert_update_start

This call is available only on the ethernet gateway. It starts the certificate update process and should be called at the beginning before any call to leaps_cert_update_write. The request returns command status = “ok” if accepted followed by the first data request. User should respond to the data request with the leaps_cert_update_write. The update is not started if refused. Reasons for refused certificate update are:

  • not permitted - invalid size of the certificate to be uploaded

  • internal error

  • invalid parameter - the ID of the certificate to be uploaded is unknown

Certificate must be in der format.


Input
  • cert_type: ? 8-bit unsigned integer ? (Certificate identifier/type, 0 - CA certificate, 1 - my certificate, 2 - my private key.)

  • size: ? 32-bit unsigned integer? (Total size of the certificate to be uploaded, up to 2048 bytes.)

Output
  • offset: ? 32-bit unsigned integer? (Expected offset of next data chunk.)

  • size: ? 32-bit unsigned integer? (Expected size of next data chunk.)

  • Status Code


Example

TLV Request

Type

Length

Value

0x36

0x05

cert_type (1 byte)

size (4 bytes)

0x00

0xC4 0x26 0x00 0x00

Type 0x36 (54 dec) means command leaps_cert_update_start

TLV Response

Type

Length

Value

type

Length

Value

0x40

0x01

0x00

0x7E

0x08

offset

size

0x00 0x00 0x00 0x00

0xE4 0x03 0x00 0x00

Type 0x40 means status code
Type 0x7E (126) means data request