Skip to content

Commit

Permalink
issue #11, issue #7, issue #5
Browse files Browse the repository at this point in the history
  • Loading branch information
sjkp committed Feb 9, 2016
1 parent 5210fc9 commit d825ebd
Show file tree
Hide file tree
Showing 18 changed files with 249 additions and 63 deletions.
24 changes: 24 additions & 0 deletions LetsEncrypt-SiteExtension.sln
Original file line number Diff line number Diff line change
Expand Up @@ -19,54 +19,78 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{ED36B174
build.job.cmd = build.job.cmd
LetsEncrypt.nuspec = LetsEncrypt.nuspec
letsencrypt.siteextension.job.nuspec = letsencrypt.siteextension.job.nuspec
letsencrypt.siteextension.job64.nuspec = letsencrypt.siteextension.job64.nuspec
LetsEncrypt64.nuspec = LetsEncrypt64.nuspec
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{87F0FF62-16C3-43CE-B154-1B9BC28DED67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{87F0FF62-16C3-43CE-B154-1B9BC28DED67}.Debug|Any CPU.Build.0 = Debug|Any CPU
{87F0FF62-16C3-43CE-B154-1B9BC28DED67}.Debug|x64.ActiveCfg = Debug|x64
{87F0FF62-16C3-43CE-B154-1B9BC28DED67}.Debug|x64.Build.0 = Debug|x64
{87F0FF62-16C3-43CE-B154-1B9BC28DED67}.Debug|x86.ActiveCfg = Debug|x86
{87F0FF62-16C3-43CE-B154-1B9BC28DED67}.Debug|x86.Build.0 = Debug|x86
{87F0FF62-16C3-43CE-B154-1B9BC28DED67}.Release|Any CPU.ActiveCfg = Release|Any CPU
{87F0FF62-16C3-43CE-B154-1B9BC28DED67}.Release|Any CPU.Build.0 = Release|Any CPU
{87F0FF62-16C3-43CE-B154-1B9BC28DED67}.Release|x64.ActiveCfg = Release|x64
{87F0FF62-16C3-43CE-B154-1B9BC28DED67}.Release|x64.Build.0 = Release|x64
{87F0FF62-16C3-43CE-B154-1B9BC28DED67}.Release|x86.ActiveCfg = Release|x86
{87F0FF62-16C3-43CE-B154-1B9BC28DED67}.Release|x86.Build.0 = Release|x86
{8D564C1F-D94F-488C-AB13-F42C0511F76E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8D564C1F-D94F-488C-AB13-F42C0511F76E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8D564C1F-D94F-488C-AB13-F42C0511F76E}.Debug|x64.ActiveCfg = Debug|x64
{8D564C1F-D94F-488C-AB13-F42C0511F76E}.Debug|x64.Build.0 = Debug|x64
{8D564C1F-D94F-488C-AB13-F42C0511F76E}.Debug|x86.ActiveCfg = Debug|x86
{8D564C1F-D94F-488C-AB13-F42C0511F76E}.Debug|x86.Build.0 = Debug|x86
{8D564C1F-D94F-488C-AB13-F42C0511F76E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8D564C1F-D94F-488C-AB13-F42C0511F76E}.Release|Any CPU.Build.0 = Release|Any CPU
{8D564C1F-D94F-488C-AB13-F42C0511F76E}.Release|x64.ActiveCfg = Release|x64
{8D564C1F-D94F-488C-AB13-F42C0511F76E}.Release|x64.Build.0 = Release|x64
{8D564C1F-D94F-488C-AB13-F42C0511F76E}.Release|x86.ActiveCfg = Release|x86
{8D564C1F-D94F-488C-AB13-F42C0511F76E}.Release|x86.Build.0 = Release|x86
{279DE1A9-4C87-4780-A64E-6FC2E049852A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{279DE1A9-4C87-4780-A64E-6FC2E049852A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{279DE1A9-4C87-4780-A64E-6FC2E049852A}.Debug|x64.ActiveCfg = Debug|x64
{279DE1A9-4C87-4780-A64E-6FC2E049852A}.Debug|x64.Build.0 = Debug|x64
{279DE1A9-4C87-4780-A64E-6FC2E049852A}.Debug|x86.ActiveCfg = Debug|x86
{279DE1A9-4C87-4780-A64E-6FC2E049852A}.Debug|x86.Build.0 = Debug|x86
{279DE1A9-4C87-4780-A64E-6FC2E049852A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{279DE1A9-4C87-4780-A64E-6FC2E049852A}.Release|Any CPU.Build.0 = Release|Any CPU
{279DE1A9-4C87-4780-A64E-6FC2E049852A}.Release|x64.ActiveCfg = Release|x64
{279DE1A9-4C87-4780-A64E-6FC2E049852A}.Release|x64.Build.0 = Release|x64
{279DE1A9-4C87-4780-A64E-6FC2E049852A}.Release|x86.ActiveCfg = Release|x86
{279DE1A9-4C87-4780-A64E-6FC2E049852A}.Release|x86.Build.0 = Release|x86
{EFB1F15B-3ACF-4A26-8280-88BE13DBB86F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EFB1F15B-3ACF-4A26-8280-88BE13DBB86F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EFB1F15B-3ACF-4A26-8280-88BE13DBB86F}.Debug|x64.ActiveCfg = Debug|x64
{EFB1F15B-3ACF-4A26-8280-88BE13DBB86F}.Debug|x64.Build.0 = Debug|x64
{EFB1F15B-3ACF-4A26-8280-88BE13DBB86F}.Debug|x86.ActiveCfg = Debug|x86
{EFB1F15B-3ACF-4A26-8280-88BE13DBB86F}.Debug|x86.Build.0 = Debug|x86
{EFB1F15B-3ACF-4A26-8280-88BE13DBB86F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EFB1F15B-3ACF-4A26-8280-88BE13DBB86F}.Release|Any CPU.Build.0 = Release|Any CPU
{EFB1F15B-3ACF-4A26-8280-88BE13DBB86F}.Release|x64.ActiveCfg = Release|x64
{EFB1F15B-3ACF-4A26-8280-88BE13DBB86F}.Release|x64.Build.0 = Release|x64
{EFB1F15B-3ACF-4A26-8280-88BE13DBB86F}.Release|x86.ActiveCfg = Release|x86
{EFB1F15B-3ACF-4A26-8280-88BE13DBB86F}.Release|x86.Build.0 = Release|x86
{284F0226-F481-4C10-A408-4146FDBB71CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{284F0226-F481-4C10-A408-4146FDBB71CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{284F0226-F481-4C10-A408-4146FDBB71CC}.Debug|x64.ActiveCfg = Debug|x64
{284F0226-F481-4C10-A408-4146FDBB71CC}.Debug|x64.Build.0 = Debug|x64
{284F0226-F481-4C10-A408-4146FDBB71CC}.Debug|x86.ActiveCfg = Debug|x86
{284F0226-F481-4C10-A408-4146FDBB71CC}.Debug|x86.Build.0 = Debug|x86
{284F0226-F481-4C10-A408-4146FDBB71CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{284F0226-F481-4C10-A408-4146FDBB71CC}.Release|Any CPU.Build.0 = Release|Any CPU
{284F0226-F481-4C10-A408-4146FDBB71CC}.Release|x64.ActiveCfg = Release|x64
{284F0226-F481-4C10-A408-4146FDBB71CC}.Release|x64.Build.0 = Release|x64
{284F0226-F481-4C10-A408-4146FDBB71CC}.Release|x86.ActiveCfg = Release|x86
{284F0226-F481-4C10-A408-4146FDBB71CC}.Release|x86.Build.0 = Release|x86
EndGlobalSection
Expand Down
3 changes: 2 additions & 1 deletion LetsEncrypt-SiteExtension/Controllers/HomeController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,14 @@ public ActionResult Install(RequestAndInstallModel model)
ClientId = settings.ClientId,
ClientSecret = settings.ClientSecret,
Email = model.Email,
Host = model.Hostname,
Host = model.Hostnames.First(),
WebAppName = settings.WebAppName,
ResourceGroupName = settings.ResourceGroupName,
SubscriptionId = settings.SubscriptionId,
Tenant = settings.Tenant,
BaseUri = baseUri,
ServicePlanResourceGroupName = settings.ServicePlanResourceGroupName,
AlternativeNames = model.Hostnames.Skip(1).ToList()
};
var thumbprint = CertificateManager.RequestAndInstallInternal(target);
if (thumbprint != null)
Expand Down
20 changes: 19 additions & 1 deletion LetsEncrypt-SiteExtension/LetsEncrypt.SiteExtension.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="install.cmd" />
<Content Include="install64.cmd" />
<None Include="Scripts\jquery-1.10.2.intellisense.js" />
<Content Include="Scripts\jquery-1.10.2.js" />
<Content Include="Scripts\jquery-1.10.2.min.js" />
Expand Down Expand Up @@ -257,7 +258,24 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\LetsEncrypt.SiteExtension.Core\LetsEncrypt.SiteExtension.Core.csproj">
<Project>{284f0226-f481-4c10-a408-4146fdbb71cc}</Project>
Expand Down
3 changes: 2 additions & 1 deletion LetsEncrypt-SiteExtension/Models/RequestAndInstallModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ namespace LetsEncrypt.SiteExtension.Models
{
public class RequestAndInstallModel
{
[MinLength(1)]
[Required]
public string Hostname { get; set; }
public string[] Hostnames { get; set; }

[Required]
[EmailAddress]
Expand Down
6 changes: 3 additions & 3 deletions LetsEncrypt-SiteExtension/Views/Home/Install.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
<hr />
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
<div class="form-group">
@Html.LabelFor(model => model.Hostname, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.LabelFor(model => model.Hostnames, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.DropDownListFor(model => model.Hostname, ViewBag.HostNames as IEnumerable<SelectListItem>, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.Hostname, "", new { @class = "text-danger" })
@Html.ListBoxFor(model => model.Hostnames, ViewBag.HostNames as IEnumerable<SelectListItem>, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.Hostnames, "", new { @class = "text-danger" })
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion LetsEncrypt-SiteExtension/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<add key="webpages:Enabled" value="false" />
<add key="PreserveLoginUrl" value="true" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.5" />
Expand Down
15 changes: 15 additions & 0 deletions LetsEncrypt-SiteExtension/install64.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
cd /D %TEMP%
IF EXIST letsencrypt.siteextension.job (
rd /S /q letsencrypt.siteextension.job
)
mkdir letsencrypt.siteextension.job
cd letsencrypt.siteextension.job
nuget install letsencrypt.siteextension.job64 -Pre

SET JOB_FOLDER="%WEBROOT_PATH%\App_Data\jobs\continuous\letsencrypt.siteextension.job"
IF EXIST %JOB_FOLDER% (
rd /S /q %JOB_FOLDER%
)
mkdir %JOB_FOLDER%
cd letsencrypt.siteextension.job*
xcopy content %JOB_FOLDER% /E /C
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<Configuration>Debug</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x86">
<Configuration>Debug</Configuration>
<Platform>x86</Platform>
Expand All @@ -13,6 +17,10 @@
<Configuration>Release</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x86">
<Configuration>Release</Configuration>
<Platform>x86</Platform>
Expand Down Expand Up @@ -40,7 +48,6 @@
<Visible>False</Visible>
</None>
<Content Include="Scripts\Deploy-AzureResourceGroup.ps1" />
<Content Include="Templates\azuredeploy.parameters.serviceplan.local.json" />
<Content Include="Templates\azuredeploy.site.json" />
<Content Include="Templates\azuredeploy.parameters.local.json" />
<Content Include="Templates\azuredeploy.json" />
Expand Down
Loading

0 comments on commit d825ebd

Please sign in to comment.