Change Certificates.Configuration to a Sources package
This commit is contained in:
parent
0f0c88b8cd
commit
5e2bb55be0
15
Hosting.sln
15
Hosting.sln
|
|
@ -34,8 +34,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Hostin
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Hosting.WindowsServices", "src\Microsoft.AspNetCore.Hosting.WindowsServices\Microsoft.AspNetCore.Hosting.WindowsServices.csproj", "{9C93A93B-270A-4785-8F41-46C38DC33825}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Certificates.Configuration", "src\Microsoft.AspNetCore.Certificates.Configuration\Microsoft.AspNetCore.Certificates.Configuration.csproj", "{A911A891-EAC5-4AA1-B17E-B83A1BB1E8B4}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Certificates.Configuration.Tests", "test\Microsoft.AspNetCore.Certificates.Configuration.Tests\Microsoft.AspNetCore.Certificates.Configuration.Tests.csproj", "{AB0B7394-278D-4838-A59C-276ED88D00CC}"
|
||||
EndProject
|
||||
Global
|
||||
|
|
@ -196,18 +194,6 @@ Global
|
|||
{9C93A93B-270A-4785-8F41-46C38DC33825}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{9C93A93B-270A-4785-8F41-46C38DC33825}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{9C93A93B-270A-4785-8F41-46C38DC33825}.Release|x86.Build.0 = Release|Any CPU
|
||||
{A911A891-EAC5-4AA1-B17E-B83A1BB1E8B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A911A891-EAC5-4AA1-B17E-B83A1BB1E8B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A911A891-EAC5-4AA1-B17E-B83A1BB1E8B4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{A911A891-EAC5-4AA1-B17E-B83A1BB1E8B4}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{A911A891-EAC5-4AA1-B17E-B83A1BB1E8B4}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{A911A891-EAC5-4AA1-B17E-B83A1BB1E8B4}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{A911A891-EAC5-4AA1-B17E-B83A1BB1E8B4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A911A891-EAC5-4AA1-B17E-B83A1BB1E8B4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A911A891-EAC5-4AA1-B17E-B83A1BB1E8B4}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{A911A891-EAC5-4AA1-B17E-B83A1BB1E8B4}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{A911A891-EAC5-4AA1-B17E-B83A1BB1E8B4}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{A911A891-EAC5-4AA1-B17E-B83A1BB1E8B4}.Release|x86.Build.0 = Release|Any CPU
|
||||
{AB0B7394-278D-4838-A59C-276ED88D00CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AB0B7394-278D-4838-A59C-276ED88D00CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AB0B7394-278D-4838-A59C-276ED88D00CC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
|
|
@ -238,7 +224,6 @@ Global
|
|||
{39D3B138-37DB-4D03-A5A0-3F2B02EFC671} = {FEB39027-9158-4DE2-997F-7ADAEF8188D0}
|
||||
{96BC7EEA-64D9-4DA5-8E87-1C18CBFE7D12} = {E0497F39-AFFB-4819-A116-E39E361915AB}
|
||||
{9C93A93B-270A-4785-8F41-46C38DC33825} = {E0497F39-AFFB-4819-A116-E39E361915AB}
|
||||
{A911A891-EAC5-4AA1-B17E-B83A1BB1E8B4} = {E0497F39-AFFB-4819-A116-E39E361915AB}
|
||||
{AB0B7394-278D-4838-A59C-276ED88D00CC} = {FEB39027-9158-4DE2-997F-7ADAEF8188D0}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
// Don't run any rules for packages that don't ship.
|
||||
],
|
||||
"packages": {
|
||||
"Microsoft.AspNetCore.Certificates.Configuration.Sources": {},
|
||||
"Microsoft.AspNetCore.Server.IntegrationTesting": {}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.Certificates.Configuration
|
|||
/// <summary>
|
||||
/// A helper class to load certificates from files and certificate stores based on <seealso cref="IConfiguration"/> data.
|
||||
/// </summary>
|
||||
public class CertificateLoader
|
||||
internal class CertificateLoader
|
||||
{
|
||||
private readonly IConfiguration _certificatesConfiguration;
|
||||
private readonly string _environmentName;
|
||||
|
|
@ -25,7 +25,7 @@ namespace Microsoft.AspNetCore.Certificates.Configuration
|
|||
/// Creates a new instance of <see cref="CertificateLoader"/> that can load certificate references from configuration.
|
||||
/// </summary>
|
||||
/// <param name="certificatesConfiguration">An <see cref="IConfiguration"/> with information about certificates.</param>
|
||||
public CertificateLoader(IConfiguration certificatesConfiguration)
|
||||
internal CertificateLoader(IConfiguration certificatesConfiguration)
|
||||
: this(certificatesConfiguration, null, null)
|
||||
{
|
||||
}
|
||||
|
|
@ -35,7 +35,7 @@ namespace Microsoft.AspNetCore.Certificates.Configuration
|
|||
/// </summary>
|
||||
/// <param name="certificatesConfiguration">An <see cref="IConfiguration"/> with information about certificates.</param>
|
||||
/// <param name="loggerFactory">An <see cref="ILoggerFactory"/> instance.</param>
|
||||
public CertificateLoader(IConfiguration certificatesConfiguration, ILoggerFactory loggerFactory)
|
||||
internal CertificateLoader(IConfiguration certificatesConfiguration, ILoggerFactory loggerFactory)
|
||||
: this(certificatesConfiguration, loggerFactory, null)
|
||||
{
|
||||
}
|
||||
|
|
@ -46,7 +46,7 @@ namespace Microsoft.AspNetCore.Certificates.Configuration
|
|||
/// <param name="certificatesConfiguration">An <see cref="IConfiguration"/> with information about certificates.</param>
|
||||
/// <param name="loggerFactory">An <see cref="ILoggerFactory"/> instance.</param>
|
||||
/// <param name="environmentName">The name of the environment the application is running in.</param>
|
||||
public CertificateLoader(IConfiguration certificatesConfiguration, ILoggerFactory loggerFactory, string environmentName)
|
||||
internal CertificateLoader(IConfiguration certificatesConfiguration, ILoggerFactory loggerFactory, string environmentName)
|
||||
: this(certificatesConfiguration, loggerFactory, environmentName, new CertificateFileLoader(), new CertificateStoreLoader())
|
||||
{
|
||||
}
|
||||
|
|
@ -72,7 +72,7 @@ namespace Microsoft.AspNetCore.Certificates.Configuration
|
|||
/// by name, or one or more inline certificate specifications.
|
||||
/// </param>
|
||||
/// <returns>One or more loaded certificates.</returns>
|
||||
public IEnumerable<X509Certificate2> Load(IConfigurationSection certificateConfiguration)
|
||||
internal IEnumerable<X509Certificate2> Load(IConfigurationSection certificateConfiguration)
|
||||
{
|
||||
var certificateNames = certificateConfiguration.Value;
|
||||
var certificates = new List<X509Certificate2>();
|
||||
|
|
@ -182,6 +182,7 @@ namespace Microsoft.AspNetCore.Certificates.Configuration
|
|||
#if NETCOREAPP2_0
|
||||
?? TryLoad(X509KeyStorageFlags.EphemeralKeySet, out error)
|
||||
#elif NETSTANDARD2_0
|
||||
#elif NET461
|
||||
#else
|
||||
#error target frameworks need to be updated
|
||||
#endif
|
||||
|
|
@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Certificates.Configuration
|
|||
/// <summary>
|
||||
/// Loads certificates from certificate stores.
|
||||
/// </summary>
|
||||
public class CertificateStoreLoader : ICertificateStoreLoader
|
||||
internal class CertificateStoreLoader : ICertificateStoreLoader
|
||||
{
|
||||
/// <summary>
|
||||
/// Load a ceritificate from the given store location.
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp2.0;netstandard2.0</TargetFrameworks>
|
||||
<PackageTags>aspnetcore;certificates</PackageTags>
|
||||
<Description>Helpers for loading certificates from configuration.</Description>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="$(AspNetCoreVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -19,10 +19,12 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\Microsoft.AspNetCore.Certificates.Configuration\Microsoft.AspNetCore.Certificates.Configuration.csproj" />
|
||||
<Compile Include="..\..\shared\Microsoft.AspNetCore.Certificates.Configuration.Sources\**\*.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(TestSdkVersion)" />
|
||||
<PackageReference Include="Moq" Version="$(MoqVersion)" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitVersion)" />
|
||||
|
|
|
|||
|
|
@ -3,5 +3,4 @@
|
|||
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Certificates.Configuration.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
|
||||
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")]
|
||||
Loading…
Reference in New Issue