private SSLEngineResult.Status getEngineStatus() {
        switch (state) {
            case STATE_CLOSED_INBOUND:
            case STATE_CLOSED_OUTBOUND:
            case STATE_CLOSED:
                return CLOSED;
            default:
                return OK;
        }
    }
Read encrypted data from the OpenSSL network BIO
common/src/main/java/org/conscrypt/ConscryptEngine.java