Stochastic safety verification using barrier certificates