Added test cases to check for certificate error conditions