not just read the last error but clear error queue.
add :ignore_certificate_validity option.