Skip to content

Conversation

@HTHou
Copy link
Contributor

@HTHou HTHou commented Jan 9, 2026

  1. Genarate keystore
keytool -genkeypair -alias mykey -keyalg RSA -validity 3650 -keystore .keystore -ext san=dns:localhost,ip:127.0.0.1

Notice: must add -ext san=ip or dns:<DN address> in your command.

  1. Export certificate.cer file
keytool -export -alias mykey -keystore .keystore -rfc -file certificate.cer
  1. Manually import the root certificate into the system's trust store.
  2. Enable client SSL in IoTDB side.
  3. Configurate TLS in Client side.
var sessionPool = new SessionPool.Builder()
                .SetNodeUrls(sessionPoolTest.nodeUrls)
                .SetUsername(sessionPoolTest.username)
                .SetPassword(sessionPoolTest.password)
                .SetUseSsl(true)
                .SetCertificatePath("/path/to/certificate.cer")
                .Build();

var tableSessionPool = new TableSessionPool.Builder()
                .SetNodeUrls(sessionPoolTest.nodeUrls)
                .SetUsername(sessionPoolTest.username)
                .SetPassword(sessionPoolTest.password)
                .SetUseSsl(true)
                .SetCertificatePath("/path/to/certificate.cer")
                .Build();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant