One of the more surprising things I've learned in my recent study of the War of 1812 was that, before the war, America was a major supplier of grain to Wellington's army in Portugal and Spain...and that this commerce continued DURING the war, with the approval of both governments. The British kept buying because their Peninsular army needed to eat, and a series of bad harvests in Europe around that time made America the most reliable supplier available. And the Americans kept selling because the government didn't want to turn its farmers against the war by depriving them of a valuable market for their crops. Also, just because they were at war with Britain didn't make them allied with France, and they were perfectly happy to help keep the bulk of Britain's army and its best commander in the field in Europe, fighting someone else. Makes sense, once you understand their reasoning.
However, in reading Adam Hochschild's book on World War I, To End All Wars, I discovered a far more baffling case of trading with the enemy. The British, you see, found themselves short of binoculars for their officers and NCOs, and lacking the capacity to manufacture them quickly, since it wasn't an industry they specialized in. At the same time, the British naval blockade cut the Germans off from their sources of rubber, also an important military commodity by that time. Germany, however, was well set up to make binoculars. So they set up a top-secret trade. Um...Whiskey? Tango? Foxtrot? Actively trading military technology with your direct enemy in a war brutal beyond example?
(Though I can't confirm the truth of the WWI story. Hochschild's research seems thorough to me, but googling turns up nothing but debates over whether it really happened. I hope it didn't, because WWI really doesn't need another level of senselessness. Sure, the War of 1812 was as pointless a conflict as was ever fought, but at least it was relatively small-scale, and the combatant nations have been at peace ever since. As for World War I...well, the British had more casualties on the first day of the Battle of the Somme than they had regular soldiers in the War of 1812. And we all know how well the Treaty of Versailles worked out...)