added some certificate verification functionality