Duality applied to contact problems with friction