Fixed ssl error hndling for android.