Add validation using provider's ca. Closes #3227.