ssl_write: pass right errno