diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/WebsitesSSL.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/WebsitesSSL.ascx.resx
index d533240d..d2bb349a 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/WebsitesSSL.ascx.resx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/WebsitesSSL.ascx.resx
@@ -265,4 +265,7 @@
- |
-
- |
-
+ | |
|
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitesSSL.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitesSSL.ascx.cs
index dcd9189b..e43f1316 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitesSSL.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitesSSL.ascx.cs
@@ -109,9 +109,8 @@ namespace WebsitePanel.Portal
private void BindListOfAvailableSslDomains(string websiteName, string domainName)
{
- lstDomains.Items.Clear();
- lstDomains.Items.Add(new ListItem(websiteName, websiteName));
- lstDomains.Items.Add(new ListItem(domainName, domainName));
+ rbSiteCertificate.Text = websiteName;
+ rbDomainCertificate.Text = "*." + domainName;
}
public void BindWebItem(WebVirtualDirectory item)
@@ -237,25 +236,22 @@ namespace WebsitePanel.Portal
protected void btnCSR_Click(object sender, EventArgs e)
{
- string domain = lstDomains.SelectedValue;
- // Ensure wildcard certificate request is correct
- if (chkWild.Checked)
- domain = "*." + domain;
//
string distinguishedName = string.Format(@"CN={0},
O={1},
OU={2},
L={3},
S={4},
- C={5}", domain,
- txtCompany.Text,
- txtOU.Text,
- txtCity.Text,
- State,
- lstCountries.SelectedValue);
+ C={5}",
+ rbSiteCertificate.Checked ? rbSiteCertificate.Text : rbDomainCertificate.Text,
+ txtCompany.Text,
+ txtOU.Text,
+ txtCity.Text,
+ State,
+ lstCountries.SelectedValue);
SSLCertificate certificate = new SSLCertificate();
- certificate.Hostname = domain;
+ certificate.Hostname = rbSiteCertificate.Checked ? rbSiteCertificate.Text : rbDomainCertificate.Text;
certificate.DistinguishedName = distinguishedName;
certificate.CSRLength = Convert.ToInt32(lstBits.SelectedValue);
certificate.Organisation = txtCompany.Text;
@@ -307,18 +303,12 @@ namespace WebsitePanel.Portal
protected void btnRenCSR_Click(object sender, EventArgs e)
{
- //
- string domain = lstDomains.SelectedValue;
- //
- if (chkWild.Checked)
- domain = "*." + domain;
- //
string distinguishedName = string.Format(@"CN={0},
O={1},
OU={2},
L={3},
S={4},
- C={5}", domain,
+ C={5}", rbSiteCertificate.Checked ? rbSiteCertificate.Text : rbDomainCertificate.Text,
txtCompany.Text,
txtOU.Text,
txtCity.Text,
@@ -326,7 +316,7 @@ namespace WebsitePanel.Portal
lstCountries.SelectedValue);
SSLCertificate certificate = new SSLCertificate();
- certificate.Hostname = domain;
+ certificate.Hostname = rbSiteCertificate.Checked ? rbSiteCertificate.Text : rbDomainCertificate.Text;
certificate.DistinguishedName = distinguishedName;
certificate.CSRLength = Convert.ToInt32(lstBits.SelectedValue);
certificate.Organisation = txtCompany.Text;
@@ -382,6 +372,8 @@ namespace WebsitePanel.Portal
pnlInstallCertificate.Visible = false;
SSLNotInstalled.Visible = true;
//
+ TabContainer1.ActiveTab = tabInstalled;
+
RefreshControlLayout(webSiteId);
}
@@ -508,12 +500,7 @@ namespace WebsitePanel.Portal
tabCSR.HeaderText = GetLocalizedString("SSLGenereateRenewal.HeaderText");
string hostname = cert.Hostname;
- // Check if it is a wildcard certificate
- if (!String.IsNullOrEmpty(cert.Hostname) && cert.Hostname.StartsWith("*"))
- {
- chkWild.Checked = true;
- hostname = hostname.Remove(0, 2);
- }
+
// Assign hostname
SetCertHostnameSelection(hostname);
// Assign state
@@ -653,14 +640,7 @@ namespace WebsitePanel.Portal
protected void SetCertHostnameSelection(string hostname)
{
- //Bind new CSR with current certificate details
- var li = lstDomains.Items.FindByValue(hostname);
- // Select domain name from the existing certificate
- if (li != null)
- {
- lstDomains.ClearSelection();
- li.Selected = true;
- }
+ rbSiteCertificate.Checked = (rbSiteCertificate.Text == hostname);
}
protected void SetCertCountrySelection(string country)
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitesSSL.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitesSSL.ascx.designer.cs
index ed9eb37e..8243cd82 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitesSSL.ascx.designer.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitesSSL.ascx.designer.cs
@@ -337,31 +337,31 @@ namespace WebsitePanel.Portal {
protected global::System.Web.UI.WebControls.Panel pnlCSR;
///