Windshield Gasket Question

The gasket appears too be good,but the trim stuff around it is shot..any ideas on were to get something that would work? On the corners as well?