Revert D4389970: add an option to clear error before calling ssl methods