code: private void init(SSLContextImpl ctx) {
          if (debug != null && Debug.isOn("ssl")) {
              System.out.println("Using SSLEngineImpl.");
          }
  
          sslContext = ctx;
          sess = SSLSessionImpl.nullSession;
          handshakeSession = null;
  
          /*
           * State is cs_START until we initialize the handshaker.
           *
           * Apps using SSLEngine are probably going to be server.
           * Somewhat arbitrary choice.
           */
          roleIsServer = true;
          connectionState = cs_START;
          receivedCCS = false;
  
          /*
           * default read and write side cipher and MAC support
           *
           * Note:  compression support would go here too
           */
          readCipher = CipherBox.NULL;
          readMAC = MAC.NULL;
          writeCipher = CipherBox.NULL;
          writeMAC = MAC.NULL;
  
          // default security parameters for secure renegotiation
          secureRenegotiation = false;
          clientVerifyData = new byte[0];
          serverVerifyData = new byte[0];
  
          enabledCipherSuites =
                  sslContext.getDefaultCipherSuiteList(roleIsServer);
          enabledProtocols =
                  sslContext.getDefaultProtocolList(roleIsServer);
  
          wrapLock = new Object();
          unwrapLock = new Object();
          writeLock = new Object();
  
          /*
           * Save the Access Control Context.  This will be used later
           * for a couple of things, including providing a context to
           * run tasks in, and for determining which credentials
           * to use for Subject based (JAAS) decisions
           */
          acc = AccessController.getContext();
  
          /*
           * All outbound application data goes through this OutputRecord,
           * other data goes through their respective records created
           * elsewhere.  All inbound data goes through this one
           * input record.
           */
          outputRecord =
              new EngineOutputRecord(Record.ct_application_data, this);
          inputRecord = new EngineInputRecord(this);
          inputRecord.enableFormatChecks();
  
          writer = new EngineWriter();
      }
docs: Initializes the Engine