Abbreviated SSL pipe code while keeping it exception-safe