Added certificate validation.