handle correctly unsuccessful ssl.wrap call