public static SSLEngine createSSLEngine(String keyStorePath, String trustStorePath,
            String keyStorePassword, String trustStorePassword,
            boolean isClientMode, boolean needTwoWayAuth)
            throws Exception {

        InputStream keyStoreStream = new FileInputStream(new File(keyStorePath));
        InputStream trustStoreStream = new FileInputStream(new File(trustStorePath));

        return createSSLEngine(keyStoreStream, keyStorePassword, trustStoreStream,
                trustStorePassword, isClientMode, needTwoWayAuth);
    }
Create a SSL engine

@param keyStorePath           the key-store file path
@param trustStorePath         the trust-store file path
@param keyStorePassword       the key-store password
@param trustStorePassword     the trust-store password
@param isClientMode          whether client mode
@param needTwoWayAuth        Whether require two-way authentication
@return                      the SSL engine
@throws Exception            the exception information while creating
inlong-tubemq/tubemq-core/src/main/java/org/apache/inlong/tubemq/corerpc/utils/TSSLEngineUtil.java