Fix for IOT-1214: Incorrect use of tinyCBOR API in security code