Yongnuo has recently released their 50 mm f/1.8 lens that is almost identical to the Canon 50 mm f1.8 in their external design. They've also created a lot of clones of Canon flashguns and accessories like YN600EX-RT (Canon 600EX-RT) and the YN-E3-RT Radio Transmitter (ST-E3-RT Speedlite Transmitter) that are actually not that easy to tell apart from the Canon counterparts.
I guess that the patents regarding the 50 mm lens might be outdated, but the 600EX-RT was released in March 2012 so surely its protection must still be valid.
How can these products be legal to sell, and perhaps more important to photographers, are they legal to buy?
I realise that law may differ a lot between countries, but a general answer would be helpful too.