Add the port number to the subject DN of the self signed certificate. This is done because self-signed certificates are used for test and evaluation. During test and evaluation installing several instances in the same host is quite common, so having a different subject DN per instance is helpful to help identifying the instance. Moreover since the code of the tools uses the subject DN of the certificate as alias we can use the same keystore for all the servers installed on the same machine that use a self-signed certificate.
| | |
| | | */ |
| | | private String getSelfSignedCertificateSubjectDN() |
| | | { |
| | | return "cn="+Rdn.escapeValue(getUserData().getHostName())+ |
| | | ",O=OpenDS Self-Signed Certificate"; |
| | | int port; |
| | | SecurityOptions sec = getUserData().getSecurityOptions(); |
| | | if (sec.getEnableSSL()) |
| | | { |
| | | port = sec.getSslPort(); |
| | | } |
| | | else |
| | | { |
| | | port = getUserData().getServerPort(); |
| | | } |
| | | |
| | | return "cn="+Rdn.escapeValue(getUserData().getHostName()+":"+port)+ |
| | | ",O=OpenDS Self-Signed Certificate"; |
| | | } |
| | | |
| | | /** |