mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Valery Kharseko
26 mins ago 0af6285cffb4b86365085e584ae1ab24b6366ca1
refs
author Valery Kharseko <vharseko@3a-systems.ru>
Saturday, November 28, 2026 10:50 +0100
committer GitHub <noreply@github.com>
Saturday, November 28, 2026 10:50 +0100
commit0af6285cffb4b86365085e584ae1ab24b6366ca1
tree e59efef8360f42b278ce44f1f862558bc5fe3c2a tree | zip | gz
parent c69ef7be2dc5b28f9fa1b75547ba1e548ae5608e view | diff
[#487] Suggest a truststore path and read its PIN in dsreplication (#1336)

## Summary

- Suggest the writable truststore used for the connection when an
operator chooses to save a certificate permanently. Enter accepts the
suggestion, and the operator can enter another path.
- Reuse the connection password for the same truststore or try the first
line of its `.pin` file. Prompt for a password if the PIN file is
unavailable or loading the truststore with its PIN fails. Write the
certificate only after the truststore loads successfully with the
selected password.

Refs [discussion
#487](https://github.com/OpenIdentityPlatform/OpenDJ/discussions/487).

## Verification

- Maven `verify` on Java 21 passed all 18 targeted tests in
`ConsoleApplicationTestCase`,
`LDAPConnectionConsoleInteractionTestCase`, and
`ReplicationCliMainTest`.
- All nine tests in `LDAPConnectionConsoleInteractionTestCase` passed on
Java 11 and 27.
- The new regression cases use an empty PKCS#12 truststore and a UTF-8
BOM in its `.pin` file. A correct console password saves the first
certificate. A wrong password preserves the original file byte for byte.
3 files modified
230 ■■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/util/cli/LDAPConnectionConsoleInteraction.java 94 ●●●●● diff | view | raw | blame | history
opendj-server-legacy/src/messages/org/opends/messages/tool.properties 1 ●●●●● diff | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/util/cli/LDAPConnectionConsoleInteractionTestCase.java 135 ●●●●● diff | view | raw | blame | history