How is signing enabled via MavLink

During development of firmware update via MavLink for our device, we somehow randomly locked Cube (with Ardupilot 4.5.0) by enabling MavLink signing on USB port (and most likely also on all others). It happened twice now, however we can’t replicate it if we want to.

When this happens, MissionPlanner shows error “Packet failed signature but passed crc” for all input messages when connected via USB directly to the Cube.

My question is about how exactly is signing enabled via Mavlink? Information about what particular messages are used for key transmission and enabling will be helpful! Google was not helpful.

(We use TUNNEL messages for firmware update procedure and I suppose we are most likely somehow misleading Ardupilot firmware to enable signing by some message)

Thanks!

@Michael_Oborne will know?