From 4ac4b275bdde78a84b8330e421ce54b11e981049 Mon Sep 17 00:00:00 2001
From: ludovicp <ludovicp@localhost>
Date: Fri, 30 Jul 2010 13:40:30 +0000
Subject: [PATCH] Fix issue 4573 - Admin Connector certificate should use the host name provided by the user in setup. This is achieved by storing the specified hostname in a temporary file under cn=config, which will be used for generating the self-signed certificates and then deleted. If changing or deleting the self-signed certificates, the provided host name is lost and must be manually specified again.
---
opends/src/server/org/opends/server/core/DirectoryServer.java | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/DirectoryServer.java b/opends/src/server/org/opends/server/core/DirectoryServer.java
index 1cf51cf..fc9c4ce 100644
--- a/opends/src/server/org/opends/server/core/DirectoryServer.java
+++ b/opends/src/server/org/opends/server/core/DirectoryServer.java
@@ -1576,6 +1576,14 @@
{
serverStartingFile.delete();
}
+
+ // If a host name file exists, then remove it.
+ File hostNameFile = new File(configHandler.getInstanceRoot() +
+ File.separator + SetupUtils.HOST_NAME_FILE);
+ if (hostNameFile.exists())
+ {
+ hostNameFile.delete();
+ }
}
}
--
Gitblit v1.10.0