Extracted the opening and closing of the AmiSSL3 library.