Safety of food in cans
American canned food manufacturers use metal containers (cans) that should not impart any toxins into the foods they contain. Since they are acidic, tomatoes may react with the metal containers and take on a metallic taste and discolor the interior of the can. This should not be unsafe.
In the past, lead was used to solder cans closed. That is no longer used.
Some cans have a sealant in the inside to keep them from reacting with acidic foods. Some sealants contain Bisphenol A (BPA). Small amounts may be absorbed into the food. There is ongoing research about BPA and canned foods, but at this time, the FDA research indicates the amounts used in cans and absorbed by foods are llimited and safe for humans. Storing canned foods at moderate temperatures (never in a warm or hot location), not cooking in the cans (as some people do while camping) and removing leftover portions of the food from the can for refrigerator storage will all reduce the amounts of BPA that might transfer into the food and protect the quality of the food, if it is in the sealant in that container.
Hope this helps.